chiark / gitweb /
set explicit colors instead of using rc file
[disorder] / disobedience / menu.c
index 843f45148565ea7a20c61ebc07496d356ae3a543..8900cf27900a6231434df03808bb4b89f4f97775 100644 (file)
@@ -111,6 +111,14 @@ static void about_popup(gpointer attribute((unused)) callback_data,
                            0);
 }
 
+static void manual_popup(gpointer attribute((unused)) callback_data,
+                       guint attribute((unused)) callback_action,
+                       GtkWidget attribute((unused)) *menu_item) {
+  D(("manual_popup"));
+
+  popup_help();
+}
+
 /** @brief Callde when version arrives, displays about... popup */
 static void about_popup_got_version(void attribute((unused)) *v,
                                     const char *value) {
@@ -138,6 +146,8 @@ static void about_popup_got_version(void attribute((unused)) *v,
 
 /** @brief Create the menu bar widget */
 GtkWidget *menubar(GtkWidget *w) {
+  GtkWidget *m;
+
   static const GtkItemFactoryEntry entries[] = {
     {
       (char *)"/File",                  /* path */
@@ -238,6 +248,14 @@ GtkWidget *menubar(GtkWidget *w) {
       (char *)"<Branch>",               /* item_type */
       0                                 /* extra_data */
     },
+    {
+      (char *)"/Help/Manual page",      /* path */
+      0,                                /* accelerator */
+      manual_popup,                     /* callback */
+      0,                                /* callback_action */
+      0,                                /* item_type */
+      0                                 /* extra_data */
+    },
     {
       (char *)"/Help/About DisOrder",   /* path */
       0,                                /* accelerator */
@@ -265,9 +283,10 @@ GtkWidget *menubar(GtkWidget *w) {
                                                  "<GdisorderMain>/Edit/Track properties");
   assert(selectall_widget != 0);
   assert(properties_widget != 0);
-  return gtk_item_factory_get_widget(mainmenufactory,
-                                     "<GdisorderMain>");
-  /* menu bar had better not expand vertically if the window is too big */
+  m = gtk_item_factory_get_widget(mainmenufactory,
+                                  "<GdisorderMain>");
+  set_tool_colors(m);
+  return m;
 }
 
 /*