gimp r25985 - in trunk: . app/widgets



Author: mitch
Date: Tue Jun 24 23:12:00 2008
New Revision: 25985
URL: http://svn.gnome.org/viewvc/gimp?rev=25985&view=rev

Log:
2008-06-25  Michael Natterer  <mitch gimp org>

	* app/widgets/gimpsettingseditor.[ch]: add dummy import and export
	buttons, give the list a minimum size.

	* app/widgets/gimpsettingsbox.c: use the correct dialog border.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimpsettingsbox.c
   trunk/app/widgets/gimpsettingseditor.c
   trunk/app/widgets/gimpsettingseditor.h

Modified: trunk/app/widgets/gimpsettingsbox.c
==============================================================================
--- trunk/app/widgets/gimpsettingsbox.c	(original)
+++ trunk/app/widgets/gimpsettingsbox.c	Tue Jun 24 23:12:00 2008
@@ -602,7 +602,7 @@
   editor = gimp_settings_editor_new (box->gimp,
                                      box->config,
                                      box->container);
-  gtk_container_set_border_width (GTK_CONTAINER (editor), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
   gtk_container_add (GTK_CONTAINER (GTK_DIALOG (box->editor_dialog)->vbox),
                      editor);
   gtk_widget_show (editor);

Modified: trunk/app/widgets/gimpsettingseditor.c
==============================================================================
--- trunk/app/widgets/gimpsettingseditor.c	(original)
+++ trunk/app/widgets/gimpsettingseditor.c	Tue Jun 24 23:12:00 2008
@@ -75,6 +75,10 @@
                                                      GimpViewable        *viewable,
                                                      gpointer             insert_data,
                                                      GimpSettingsEditor  *editor);
+static void gimp_settings_editor_import_clicked     (GtkWidget           *widget,
+                                                     GimpSettingsEditor  *editor);
+static void gimp_settings_editor_export_clicked     (GtkWidget           *widget,
+                                                     GimpSettingsEditor  *editor);
 static void gimp_settings_editor_delete_clicked     (GtkWidget           *widget,
                                                      GimpSettingsEditor  *editor);
 static void gimp_settings_editor_name_edited        (GtkCellRendererText *cell,
@@ -146,6 +150,7 @@
   editor->view = gimp_container_tree_view_new (editor->container,
                                                gimp_get_user_context (editor->gimp),
                                                16, 0);
+  gtk_widget_set_size_request (editor->view, 200, 200);
   gtk_container_add (GTK_CONTAINER (editor), editor->view);
   gtk_widget_show (editor->view);
 
@@ -169,6 +174,24 @@
                     G_CALLBACK (gimp_settings_editor_name_edited),
                     editor);
 
+  editor->import_button =
+    gimp_editor_add_button (GIMP_EDITOR (tree_view),
+                            GTK_STOCK_OPEN,
+                            _("Import setting from a file."),
+                            NULL,
+                            G_CALLBACK (gimp_settings_editor_import_clicked),
+                            NULL,
+                            editor);
+
+  editor->export_button =
+    gimp_editor_add_button (GIMP_EDITOR (tree_view),
+                            GTK_STOCK_SAVE,
+                            _("Export the selected setting to a file."),
+                            NULL,
+                            G_CALLBACK (gimp_settings_editor_export_clicked),
+                            NULL,
+                            editor);
+
   editor->delete_button =
     gimp_editor_add_button (GIMP_EDITOR (tree_view),
                             GTK_STOCK_DELETE,
@@ -283,11 +306,25 @@
 {
   editor->selected_setting = G_OBJECT (viewable);
 
+  gtk_widget_set_sensitive (editor->export_button,
+                            editor->selected_setting != NULL);
   gtk_widget_set_sensitive (editor->delete_button,
                             editor->selected_setting != NULL);
 }
 
 static void
+gimp_settings_editor_import_clicked (GtkWidget          *widget,
+                                     GimpSettingsEditor *editor)
+{
+}
+
+static void
+gimp_settings_editor_export_clicked (GtkWidget          *widget,
+                                     GimpSettingsEditor *editor)
+{
+}
+
+static void
 gimp_settings_editor_delete_clicked (GtkWidget          *widget,
                                      GimpSettingsEditor *editor)
 {

Modified: trunk/app/widgets/gimpsettingseditor.h
==============================================================================
--- trunk/app/widgets/gimpsettingseditor.h	(original)
+++ trunk/app/widgets/gimpsettingseditor.h	Tue Jun 24 23:12:00 2008
@@ -43,6 +43,8 @@
   GObject       *selected_setting;
 
   GtkWidget     *view;
+  GtkWidget     *import_button;
+  GtkWidget     *export_button;
   GtkWidget     *delete_button;
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]