From 1191951e0868770cc2424535ac659485dae98984 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Thu, 25 Apr 2024 19:38:44 +0200 Subject: FIX Added more themes, fixed menu icons --- includes/callbacks.h | 2 ++ includes/uidefs.h | 24 ++++++++---------------- pixmaps/bg5_dark.jpg | Bin 0 -> 254501 bytes pixmaps/bg5_light.jpg | Bin 0 -> 282249 bytes pixmaps/bg6_dark.jpg | Bin 0 -> 167496 bytes pixmaps/bg6_light.jpg | Bin 0 -> 167532 bytes shell/callbacks.c | 36 ++++++++++++++++++++++++++++++++++++ shell/menu.c | 8 ++++++++ shell/shell.c | 6 +++++- 9 files changed, 59 insertions(+), 17 deletions(-) create mode 100755 pixmaps/bg5_dark.jpg create mode 100755 pixmaps/bg5_light.jpg create mode 100755 pixmaps/bg6_dark.jpg create mode 100755 pixmaps/bg6_light.jpg diff --git a/includes/callbacks.h b/includes/callbacks.h index 4ecfa58c..65886704 100644 --- a/includes/callbacks.h +++ b/includes/callbacks.h @@ -46,5 +46,7 @@ void cb_theme1(); void cb_theme2(); void cb_theme3(); void cb_theme4(); +void cb_theme5(); +void cb_theme6(); #endif /* __CALLBACKS_H__ */ diff --git a/includes/uidefs.h b/includes/uidefs.h index d8b12143..2165ea8c 100644 --- a/includes/uidefs.h +++ b/includes/uidefs.h @@ -3,28 +3,19 @@ #include "config.h" -#if RELEASE -#define DEBUG_TOOLBAR_ITEMS -#else /* !RELEASE */ -#define DEBUG_TOOLBAR_ITEMS \ - "" \ - "" -#endif /* !RELEASE */ - #define SYNC_MANAGER_MENU_ITEMS \ "" \ - "" \ + "" \ "" #define SYNC_MANAGER_TOOL_ITEMS \ - "" + "" char *uidefs_str = "" " " " " - " " - " " + " " + " " SYNC_MANAGER_MENU_ITEMS \ " " " " @@ -38,14 +29,16 @@ char *uidefs_str = " " " " " " + " " + " " " " " " " " " " " " " " - " " - " " + " " + " " " " " " " " @@ -56,7 +49,6 @@ char *uidefs_str = " " " " " " - DEBUG_TOOLBAR_ITEMS \ SYNC_MANAGER_TOOL_ITEMS \ " " " " diff --git a/pixmaps/bg5_dark.jpg b/pixmaps/bg5_dark.jpg new file mode 100755 index 00000000..6023c0de Binary files /dev/null and b/pixmaps/bg5_dark.jpg differ diff --git a/pixmaps/bg5_light.jpg b/pixmaps/bg5_light.jpg new file mode 100755 index 00000000..5cc4f266 Binary files /dev/null and b/pixmaps/bg5_light.jpg differ diff --git a/pixmaps/bg6_dark.jpg b/pixmaps/bg6_dark.jpg new file mode 100755 index 00000000..cbdba6d9 Binary files /dev/null and b/pixmaps/bg6_dark.jpg differ diff --git a/pixmaps/bg6_light.jpg b/pixmaps/bg6_light.jpg new file mode 100755 index 00000000..b9ed47f4 Binary files /dev/null and b/pixmaps/bg6_light.jpg differ diff --git a/shell/callbacks.c b/shell/callbacks.c index e6482c4f..1d151b9c 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -70,6 +70,8 @@ void cb_theme1() if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); } cb_disable_theme(); } @@ -81,6 +83,8 @@ void cb_theme2() if(shell_action_get_active("Theme1Action")) shell_action_set_active("Theme1Action",FALSE); if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); } cb_disable_theme(); } @@ -92,6 +96,8 @@ void cb_theme3() if(shell_action_get_active("Theme1Action")) shell_action_set_active("Theme1Action",FALSE); if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); } cb_disable_theme(); } @@ -103,6 +109,34 @@ void cb_theme4() if(shell_action_get_active("Theme1Action")) shell_action_set_active("Theme1Action",FALSE); if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); + } + cb_disable_theme(); +} +void cb_theme5() +{ + if(shell_action_get_active("Theme5Action")){ + params.theme=5; + if(shell_action_get_active("DisableThemeAction")) shell_action_set_active("DisableThemeAction",FALSE); + if(shell_action_get_active("Theme1Action")) shell_action_set_active("Theme1Action",FALSE); + if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); + if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); + if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); + } + cb_disable_theme(); +} +void cb_theme6() +{ + if(shell_action_get_active("Theme6Action")){ + params.theme=6; + if(shell_action_get_active("DisableThemeAction")) shell_action_set_active("DisableThemeAction",FALSE); + if(shell_action_get_active("Theme1Action")) shell_action_set_active("Theme1Action",FALSE); + if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); + if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); + if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); } cb_disable_theme(); } @@ -128,6 +162,8 @@ void cb_disable_theme() if(shell_action_get_active("Theme2Action")) shell_action_set_active("Theme2Action",FALSE); if(shell_action_get_active("Theme3Action")) shell_action_set_active("Theme3Action",FALSE); if(shell_action_get_active("Theme4Action")) shell_action_set_active("Theme4Action",FALSE); + if(shell_action_get_active("Theme5Action")) shell_action_set_active("Theme5Action",FALSE); + if(shell_action_get_active("Theme6Action")) shell_action_set_active("Theme6Action",FALSE); } g_mkdir(g_get_user_config_dir(),0755); diff --git a/shell/menu.c b/shell/menu.c index 2d5e0874..72d5ab42 100644 --- a/shell/menu.c +++ b/shell/menu.c @@ -128,6 +128,14 @@ static GtkToggleActionEntry toggle_entries[] = { N_("Theme Tux Star"), NULL, NULL, G_CALLBACK(cb_theme4)}, + {"Theme5Action", NULL, + N_("Theme Retro PC"), NULL, + NULL, + G_CALLBACK(cb_theme5)}, + {"Theme6Action", NULL, + N_("Theme Silicon Crypto"), NULL, + NULL, + G_CALLBACK(cb_theme6)}, #endif }; diff --git a/shell/shell.c b/shell/shell.c index f3225783..f7572307 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -514,7 +514,7 @@ static void create_window(void) params.theme = g_key_file_get_integer(key_file, "Theme", "ThemeNumber", NULL); if(params.theme==0) params.theme=1; if(params.theme<-1) params.theme=-1; - if(params.theme>4) params.theme=-1; + if(params.theme>6) params.theme=-1; g_free(conf_path); g_key_file_free(key_file); @@ -523,6 +523,8 @@ static void create_window(void) if(params.theme==2) shell_action_set_active("Theme2Action", TRUE); if(params.theme==3) shell_action_set_active("Theme3Action", TRUE); if(params.theme==4) shell_action_set_active("Theme4Action", TRUE); + if(params.theme==5) shell_action_set_active("Theme5Action", TRUE); + if(params.theme==6) shell_action_set_active("Theme6Action", TRUE); #if GTK_CHECK_VERSION(3, 0, 0) if(params.theme>0){ @@ -784,6 +786,8 @@ void shell_init(GSList * modules) shell_action_set_property("Theme2Action", "draw-as-radio", TRUE); shell_action_set_property("Theme3Action", "draw-as-radio", TRUE); shell_action_set_property("Theme4Action", "draw-as-radio", TRUE); + shell_action_set_property("Theme5Action", "draw-as-radio", TRUE); + shell_action_set_property("Theme6Action", "draw-as-radio", TRUE); shell->tree = tree_new(); shell->info_tree = info_tree_new(); -- cgit v1.2.3