summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <micke@codefactory.se>2001-12-22 13:03:45 +0000
committerMikael Hallendal <hallski@src.gnome.org>2001-12-22 13:03:45 +0000
commit4fbdd6126af5f5a6cdaab66ee9912b11a564ded8 (patch)
tree39c56228e8eb4ad20635a0ec5674c86f6b3587aa
parented71818601524ec405fa7655d7cfc064dc137d8d (diff)
downloadyelp-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--ChangeLog8
-rw-r--r--TODO2
-rw-r--r--src/yelp-window.c14
3 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 05554b8d..34dbfaca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/TODO b/TODO
index 2d612ccb..40b46151 100644
--- a/TODO
+++ b/TODO
@@ -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 ();