summaryrefslogtreecommitdiff
path: root/capplets/appearance
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/appearance')
-rw-r--r--capplets/appearance/data/appearance.ui20
-rw-r--r--capplets/appearance/theme-save.c11
2 files changed, 27 insertions, 4 deletions
diff --git a/capplets/appearance/data/appearance.ui b/capplets/appearance/data/appearance.ui
index 5f117007..e9736ca9 100644
--- a/capplets/appearance/data/appearance.ui
+++ b/capplets/appearance/data/appearance.ui
@@ -2455,7 +2455,7 @@
<object class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="border_width">6</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -2542,6 +2542,24 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="save_notification_checkbutton">
+ <property name="label" translatable="yes">Save _notification theme</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
</object>
diff --git a/capplets/appearance/theme-save.c b/capplets/appearance/theme-save.c
index 64184444..81265b79 100644
--- a/capplets/appearance/theme-save.c
+++ b/capplets/appearance/theme-save.c
@@ -172,6 +172,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
const gchar *theme_name,
const gchar *theme_description,
gboolean save_background,
+ gboolean save_notification,
GError **error)
{
gchar* dir;
@@ -237,7 +238,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
g_free (str);
}
- if (theme_info->notification_theme_name) {
+ if (theme_info->notification_theme_name && save_notification) {
str = g_strdup_printf ("NotificationTheme=%s\n", theme_info->notification_theme_name);
g_output_stream_write (output, str, strlen (str), NULL, NULL);
g_free (str);
@@ -272,6 +273,7 @@ save_theme_to_disk (MateThemeMetaInfo *theme_info,
const gchar *theme_name,
const gchar *theme_description,
gboolean save_background,
+ gboolean save_notification,
GError **error)
{
if (!check_theme_name (theme_name, error))
@@ -280,7 +282,7 @@ save_theme_to_disk (MateThemeMetaInfo *theme_info,
if (!setup_directory_structure (theme_name, error))
return FALSE;
- if (!write_theme_to_disk (theme_info, theme_name, theme_description, save_background, error))
+ if (!write_theme_to_disk (theme_info, theme_name, theme_description, save_background, save_notification, error))
return FALSE;
return TRUE;
@@ -302,6 +304,7 @@ save_dialog_response (GtkWidget *save_dialog,
gchar *theme_description = NULL;
gchar *theme_name = NULL;
gboolean save_background;
+ gboolean save_notification;
GError *error = NULL;
entry = appearance_capplet_get_widget (data, "save_dialog_entry");
@@ -317,8 +320,10 @@ save_dialog_response (GtkWidget *save_dialog,
theme_info = (MateThemeMetaInfo *) g_object_get_data (G_OBJECT (save_dialog), "meta-theme-info");
save_background = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
appearance_capplet_get_widget (data, "save_background_checkbutton")));
+ save_notification = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
+ appearance_capplet_get_widget (data, "save_notification_checkbutton")));
- if (save_theme_to_disk (theme_info, theme_name, theme_description, save_background, &error)) {
+ if (save_theme_to_disk (theme_info, theme_name, theme_description, save_background, save_notification, &error)) {
/* remove the custom theme */
GtkTreeIter iter;