Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor

Showing 1 changed file with 26 additions and 2 deletions. Show diff stats Hide diff stats

  1. 28  tools/helper.c
28  tools/helper.c
@@ -14,8 +14,6 @@ static char const _license[] =
14 14
 "\n"
15 15
 "You should have received a copy of the GNU General Public License\n"
16 16
 "along with this program.  If not, see <http://www.gnu.org/licenses/>.";
17  
-/* TODO:
18  
- * - implement all remaining helpers */
19 17
 
20 18
 
21 19
 
@@ -77,12 +75,15 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel,
77 75
 /* useful */
78 76
 static char const * _helper_config_get(Panel * panel, char const * section,
79 77
 		char const * variable);
  78
+static int _helper_config_set(Panel * panel, char const * section,
  79
+		char const * variable, char const * value);
80 80
 static int _helper_error(Panel * panel, char const * message, int ret);
81 81
 static void _helper_about_dialog(Panel * panel);
82 82
 static int _helper_lock(Panel * panel);
83 83
 static void _helper_logout_dialog(Panel * panel);
84 84
 static void _helper_position_menu(Panel * panel, GtkMenu * menu, gint * x,
85 85
 		gint * y, gboolean * push_in);
  86
+static void _helper_preferences_dialog(Panel * panel);
86 87
 static void _helper_rotate_screen(Panel * panel);
87 88
 static void _helper_shutdown_dialog(Panel * panel);
88 89
 static int _helper_suspend(Panel * panel);
@@ -157,10 +158,13 @@ static void _helper_init(PanelAppletHelper * helper, Panel * panel,
157 158
 	helper->type = type;
158 159
 	helper->icon_size = iconsize;
159 160
 	helper->config_get = _helper_config_get;
  161
+	helper->config_set = _helper_config_set;
160 162
 	helper->error = _helper_error;
161 163
 	helper->about_dialog = _helper_about_dialog;
  164
+	helper->lock = _helper_lock;
162 165
 	helper->logout_dialog = _helper_logout_dialog;
163 166
 	helper->position_menu = _helper_position_menu;
  167
+	helper->preferences_dialog = _helper_preferences_dialog;
164 168
 	helper->rotate_screen = _helper_rotate_screen;
165 169
 	helper->shutdown_dialog = _helper_shutdown_dialog;
166 170
 	helper->suspend = _helper_suspend;
@@ -180,6 +184,19 @@ static char const * _helper_config_get(Panel * panel, char const * section,
180 184
 }
181 185
 
182 186
 
  187
+/* helper_config_set */
  188
+static int _helper_config_set(Panel * panel, char const * section,
  189
+		char const * variable, char const * value)
  190
+{
  191
+#ifdef DEBUG
  192
+	fprintf(stderr, "DEBUG: %s(\"%s\", \"%s\", \"%s\")\n", __func__,
  193
+			section, variable, value);
  194
+#endif
  195
+	/* setting but _not_ saving the configuration */
  196
+	return config_set(panel->config, section, variable, value);
  197
+}
  198
+
  199
+
183 200
 /* helper_error */
184 201
 static int _helper_error(Panel * panel, char const * message, int ret)
185 202
 {
@@ -300,6 +317,13 @@ static void _helper_position_menu(Panel * panel, GtkMenu * menu, gint * x,
300 317
 }
301 318
 
302 319
 
  320
+/* helper_preferences_dialog */
  321
+static void _helper_preferences_dialog(Panel * panel)
  322
+{
  323
+	/* XXX do not do anything for now */
  324
+}
  325
+
  326
+
303 327
 /* helper_rotate_screen */
304 328
 static void _helper_rotate_screen(Panel * panel)
305 329
 {

No commit comments for this range

Something went wrong with that request. Please try again.