#include <hildon-cp-plugin/hildon-cp-plugin-interface.h>
#include <gtk/gtk.h>
+#include <hildon/hildon-note.h>
#include "maemo-tweaks-types.h"
#include "libmaemo-tweaks-section/maemo-tweaks-section.h"
("Maemo 5 Tweaks",
parent,
GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_OK,
+ GTK_STOCK_SAVE,
GTK_RESPONSE_OK,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
guint n_sections;
GList *sections = NULL;
gint i;
+ gboolean requires_restart = FALSE;
manager = g_object_new (MAEMO_TWEAKS_TYPE_MODULE_MANAGER,
"module-path", MODULES_DIR,
if (response == GTK_RESPONSE_OK)
{
/* Save all settings */
- g_list_foreach (sections, (GFunc) maemo_tweaks_section_save, NULL);
+ g_list_foreach (sections, (GFunc) maemo_tweaks_section_save,
+ &requires_restart);
}
-
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (manager);
if (sections)
g_list_free (sections);
}
+ if (requires_restart)
+ {
+ GtkWidget *note;
+
+ note = hildon_note_new_information
+ (GTK_WINDOW (data), "Some of the settings you have changed"
+ " will take effect only after you restart your device.");
+ gtk_dialog_run (GTK_DIALOG (note));
+ gtk_widget_destroy (note);
+ }
+
return OSSO_OK;
}