diff options
author | Mikael Hallendal <micke@codefactory.se> | 2001-12-22 13:03:45 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2001-12-22 13:03:45 +0000 |
commit | 4fbdd6126af5f5a6cdaab66ee9912b11a564ded8 (patch) | |
tree | 39c56228e8eb4ad20635a0ec5674c86f6b3587aa | |
parent | ed71818601524ec405fa7655d7cfc064dc137d8d (diff) | |
download | yelp-4fbdd6126af5f5a6cdaab66ee9912b11a564ded8.tar.gz |
added. yelp-base should listen to destroy-signal of all windows, so it
2001-12-22 Mikael Hallendal <micke@codefactory.se>
* src/yelp-window.c:
(yw_close_window_cb): added. yelp-base should listen to
destroy-signal of all windows, so it knows when to quit.
- Added Close window in File menu
- Put help-menu in <LastBranch>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/yelp-window.c | 14 |
3 files changed, 21 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2001-12-22 Mikael Hallendal <micke@codefactory.se> + + * src/yelp-window.c: + (yw_close_window_cb): added. yelp-base should listen to + destroy-signal of all windows, so it knows when to quit. + - Added Close window in File menu + - Put help-menu in <LastBranch> + 2001-12-12 Mikael Hallendal <micke@codefactory.se> * src/yelp-window.c (yw_populate): add Accel group. @@ -33,5 +33,3 @@ FEATURES: - Contents - Recently viewed - Bookmarks - -* Add tooltips for the toolbar diff --git a/src/yelp-window.c b/src/yelp-window.c index 17fcff9f..0bdd2e97 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -63,6 +63,9 @@ static void yw_index_button_clicked (GtkWidget *button, static void yw_new_window_cb (gpointer data, guint section, GtkWidget *widget); +static void yw_close_window_cb (gpointer data, + guint section, + GtkWidget *widget); static void yw_exit_cb (gpointer data, guint section, GtkWidget *widget); @@ -104,8 +107,9 @@ struct _YelpWindowPriv { static GtkItemFactoryEntry menu_items[] = { {N_("/_File"), NULL, 0, 0, "<Branch>"}, {N_("/File/_New window"), "<Control>N", yw_new_window_cb, 0, NULL}, + {N_("/File/_Close window"), "<Control>W", yw_close_window_cb, 0, NULL}, {N_("/File/E_xit"), "<Control>Q", yw_exit_cb, 0, NULL }, - {N_("/_Help"), NULL, 0, 0, "<Branch>"}, + {N_("/_Help"), NULL, 0, 0, "<LastBranch>"}, {N_("/Help/_About"), NULL, yw_about_cb, 0, NULL }, }; @@ -343,6 +347,14 @@ yw_new_window_cb (gpointer data, guint section, GtkWidget *widget) } static void +yw_close_window_cb (gpointer data, + guint section, + GtkWidget *widget) +{ + gtk_widget_destroy (GTK_WIDGET (data)); +} + +static void yw_exit_cb (gpointer data, guint section, GtkWidget *widget) { gtk_main_quit (); |