message view (body). Fixes NB#58104.
* src/widgets/modest-msg-view.[ch]:
* New method ..._grab_focus, that grabs the
focus on the body.
* src/modest-msg-view-window.c:
* Use new method modest_msg_view_grab_focus to
put the default focus instead of just using
gtk_widget_grab_focus. This should fix the
default focus when the window is created (that
should be in the message body).
* src/modest-ui-actions.c:
* Add an implementation of select all for
gtkhtml widgets.
pmo-trunk-r2223
gtk_window_set_icon (GTK_WINDOW (obj), window_icon);
/* Init the clipboard actions dim status */
- gtk_widget_grab_focus (priv->msg_view);
+ modest_msg_view_grab_focus(MODEST_MSG_VIEW (priv->msg_view));
update_window_title (MODEST_MSG_VIEW_WINDOW (obj));
modest_msg_view_set_message (MODEST_MSG_VIEW (priv->msg_view), msg);
modest_msg_view_window_update_priority (self);
update_window_title (MODEST_MSG_VIEW_WINDOW (self));
- gtk_widget_grab_focus (priv->msg_view);
+ modest_msg_view_grab_focus (MODEST_MSG_VIEW (priv->msg_view));
}
TnyFolderType
#include <tny-device.h>
#include <tny-merge-folder.h>
+#include <gtkhtml/gtkhtml.h>
+
typedef struct _GetMsgAsyncHelper {
ModestWindow *window;
ModestMailOperation *mail_op;
/* Select all messages */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(header_view));
gtk_tree_selection_select_all (selection);
+ } else if (GTK_IS_HTML (focused_widget)) {
+ gtk_html_select_all (GTK_HTML (focused_widget));
}
}
return modest_attachments_view_get_selection (MODEST_ATTACHMENTS_VIEW (priv->attachments_view));
}
+
+void
+modest_msg_view_grab_focus (ModestMsgView *view)
+{
+ ModestMsgViewPrivate *priv = NULL;
+
+ g_return_if_fail (MODEST_IS_MSG_VIEW (view));
+ priv = MODEST_MSG_VIEW_GET_PRIVATE (view);
+
+ gtk_widget_grab_focus (priv->gtkhtml);
+}
TnyHeaderFlags modest_msg_view_get_priority (ModestMsgView *self);
void modest_msg_view_set_priority (ModestMsgView *self, TnyHeaderFlags flags);
GList *modest_msg_view_get_selected_attachments (ModestMsgView *self);
+void modest_msg_view_grab_focus (ModestMsgView *self);
G_END_DECLS