diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-04-04 05:39:53 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-04-04 05:39:53 +0800 |
commit | 0b48a811d04d7fb29e60bb1e3168f9479992d3b7 (patch) | |
tree | 44fb2186ecb3f9bcded82a51f58de335023d707c | |
parent | e721bf02da4e7535a848dcc3f403f41f2ecf96b3 (diff) | |
download | gsoc2013-evolution-0b48a811d04d7fb29e60bb1e3168f9479992d3b7.tar.gz gsoc2013-evolution-0b48a811d04d7fb29e60bb1e3168f9479992d3b7.tar.zst gsoc2013-evolution-0b48a811d04d7fb29e60bb1e3168f9479992d3b7.zip |
Add a select-all callback and verb. (composer_entry_focus_in_event_cb):
2003-04-03 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (menu_edit_select_all_cb): Add a select-all
callback and verb.
(composer_entry_focus_in_event_cb): Set our bonobo-ui verbs.
svn path=/trunk/; revision=20661
-rw-r--r-- | composer/ChangeLog | 6 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index d2ffd22048..5994efe371 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2003-04-03 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer.c (menu_edit_select_all_cb): Add a select-all + callback and verb. + (composer_entry_focus_in_event_cb): Set our bonobo-ui verbs. + 2003-04-02 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-select-file.c (e_msg_composer_select_file): Guard diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 3c0a33cdda..d0c7be062a 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1706,6 +1706,22 @@ menu_edit_paste_cb (BonoboUIComponent *uic, void *data, const char *path) } static void +menu_edit_select_all_cb (BonoboUIComponent *uic, void *data, const char *path) +{ + EMsgComposer *composer = data; + + g_return_if_fail (composer->focused_entry != NULL); + + if (GTK_IS_ENTRY (composer->focused_entry)) { + gtk_editable_set_position (GTK_EDITABLE (composer->focused_entry), -1); + gtk_editable_select_region (GTK_EDITABLE (composer->focused_entry), 0, -1); + } else { + /* happy happy joy joy, an EEntry. */ + g_assert_not_reached (); + } +} + +static void menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path) { CORBA_Environment ev; @@ -1909,6 +1925,7 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("EditCut", menu_edit_cut_cb), BONOBO_UI_VERB ("EditCopy", menu_edit_copy_cb), BONOBO_UI_VERB ("EditPaste", menu_edit_paste_cb), + BONOBO_UI_VERB ("SelectAll", menu_edit_select_all_cb), BONOBO_UI_VERB ("DeleteAll", menu_edit_delete_all_cb), @@ -2805,6 +2822,7 @@ composer_entry_focus_in_event_cb (GtkWidget *widget, GdkEventFocus *event, gpoin EMsgComposer *composer = user_data; composer->focused_entry = widget; + bonobo_ui_component_add_verb_list_with_data (composer->uic, verbs, composer); return FALSE; } |