only create the custom theme entry when changes are made, and delete it

2007-07-29  Jens Granseuer  <jensgr@gmx.net>

	* data/appearance.glade:
	* appearance-themes.c: (theme_custom_cb):
	* theme-save.c: (save_dialog_response): only create the custom theme
	entry when changes are made, and delete it when the theme is saved.
	These changes obsolete the requirement for a modal details window.

svn path=/trunk/; revision=7928
This commit is contained in:
Jens Granseuer 2007-07-29 18:20:31 +00:00 committed by Jens Granseuer
parent 11cd98e2d1
commit d23fb65eb6
4 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2007-07-29 Jens Granseuer <jensgr@gmx.net>
* data/appearance.glade:
* appearance-themes.c: (theme_custom_cb):
* theme-save.c: (save_dialog_response): only create the custom theme
entry when changes are made, and delete it when the theme is saved.
These changes obsolete the requirement for a modal details window.
2007-07-29 Denis Washington <denisw@svn.gnome.org>
* appearance.h:

View file

@ -507,10 +507,6 @@ theme_custom_cb (GtkWidget *button, AppearanceData *data)
{
GtkWidget *w, *parent;
/* select the "custom" metatheme */
w = glade_xml_get_widget (data->xml, "theme_list");
theme_set_custom_from_theme (theme_get_selected (GTK_ICON_VIEW (w), data), data);
w = glade_xml_get_widget (data->xml, "theme_details");
parent = glade_xml_get_widget (data->xml, "appearance_window");
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (parent));

View file

@ -1833,7 +1833,6 @@ Text only</property>
<property name="title" translatable="yes">Customize Theme</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="modal">True</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox4">

View file

@ -318,7 +318,13 @@ save_dialog_response (GtkWidget *save_dialog,
save_background = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
glade_xml_get_widget (data->xml, "save_background_checkbutton")));
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, &error)) {
/* remove the custom theme */
GtkTreeIter iter;
if (theme_find_in_model (GTK_TREE_MODEL (data->theme_store), "__custom__", &iter))
gtk_list_store_remove (data->theme_store, &iter);
}
g_free (theme_name);
g_free (theme_description);