Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Also implemented the "config_set" helper

  • Loading branch information...
commit 1706d439a01b9d4247e561109c375800545d080b 1 parent 8e8488e
Pierre Pronchery khorben authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 tools/helper.c
17 tools/helper.c
View
@@ -77,6 +77,8 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel,
/* useful */
static char const * _helper_config_get(Panel * panel, char const * section,
char const * variable);
+static int _helper_config_set(Panel * panel, char const * section,
+ char const * variable, char const * value);
static int _helper_error(Panel * panel, char const * message, int ret);
static void _helper_about_dialog(Panel * panel);
static int _helper_lock(Panel * panel);
@@ -157,8 +159,10 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel,
helper->type = type;
helper->icon_size = iconsize;
helper->config_get = _helper_config_get;
+ helper->config_set = _helper_config_set;
helper->error = _helper_error;
helper->about_dialog = _helper_about_dialog;
+ helper->lock = _helper_lock;
helper->logout_dialog = _helper_logout_dialog;
helper->position_menu = _helper_position_menu;
helper->rotate_screen = _helper_rotate_screen;
@@ -180,6 +184,19 @@ static char const * _helper_config_get(Panel * panel, char const * section,
}
+/* helper_config_set */
+static int _helper_config_set(Panel * panel, char const * section,
+ char const * variable, char const * value)
+{
+#ifdef DEBUG
+ fprintf(stderr, "DEBUG: %s(\"%s\", \"%s\", \"%s\")\n", __func__,
+ section, variable, value);
+#endif
+ /* setting but _not_ saving the configuration */
+ return config_set(panel->config, section, variable, value);
+}
+
+
/* helper_error */
static int _helper_error(Panel * panel, char const * message, int ret)
{
Please sign in to comment.
Something went wrong with that request. Please try again.