summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornesl247 <nesl247>2007-03-05 20:07:19 +0000
committernesl247 <nesl247>2007-03-05 20:07:19 +0000
commita90710ba111041cfe9430a8ff35f47861934983d (patch)
tree71a70501283a9ea30917752d0af175a559bbcef5
parent83a86dc9b5a9fdd47c4b9ed4205dc9820ca9b35f (diff)
downloadberyl-manager-a90710ba111041cfe9430a8ff35f47861934983d.tar.gz
beryl-manager-a90710ba111041cfe9430a8ff35f47861934983d.tar.bz2
Only add beryl-settings and emerald-theme-manager
-rw-r--r--src/main.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/main.c b/src/main.c
index 68b5ce0..1e1fc7a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1142,24 +1142,34 @@ void init_menu()
menu = gtk_menu_new();
g_object_ref(menu);
- mitem = gtk_image_menu_item_new_with_label(_("Beryl Settings Manager"));
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mitem),
- make_image(DATADIR "/icons/hicolor/scalable/apps/beryl-settings.svg"));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
- gtk_widget_show(mitem);
- g_signal_connect(mitem, "activate", G_CALLBACK(startApp),
- "beryl-settings");
- mitem = gtk_image_menu_item_new_with_label(_("Emerald Theme Manager"));
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mitem),
- make_image(PIXMAPS_DIR "/emerald-theme-manager-icon.png"));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
- gtk_widget_show(mitem);
- g_signal_connect(mitem, "activate", G_CALLBACK(startApp),
- "emerald-theme-manager");
+ if (detect_app("beryl-settings"))
+ {
+ mitem = gtk_image_menu_item_new_with_label(_("Beryl Settings Manager"));
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mitem),
+ make_image(DATADIR "/icons/hicolor/scalable/apps/beryl-settings.svg"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
+ gtk_widget_show(mitem);
+ g_signal_connect(mitem, "activate", G_CALLBACK(startApp),
+ "beryl-settings");
+ }
- mitem = gtk_separator_menu_item_new();
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
- gtk_widget_show(mitem);
+ if (detect_app("emerald-theme-manager"))
+ {
+ mitem = gtk_image_menu_item_new_with_label(_("Emerald Theme Manager"));
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mitem),
+ make_image(PIXMAPS_DIR "/emerald-theme-manager-icon.png"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
+ gtk_widget_show(mitem);
+ g_signal_connect(mitem, "activate", G_CALLBACK(startApp),
+ "emerald-theme-manager");
+ }
+
+ if (detect_app("emerald-theme-manager") || detect_app("beryl-settings"))
+ {
+ mitem = gtk_separator_menu_item_new();
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mitem);
+ gtk_widget_show(mitem);
+ }
mitem = gtk_image_menu_item_new_with_label(_("Reload Window Manager"));
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mitem),