[gimp] 622863 - Input Devices list is not resizeable



commit 550669962b0d26b578ae3667fab782507d7e06ef
Author: Michael Natterer <mitch gimp org>
Date:   Wed Jan 19 19:07:13 2011 +0100

    622863 - Input Devices list is not resizeable
    
    Derive from GtkPaned instead of GtkBox, and change the handle size to
    12px via gtkrc so spacing rules are followed.

 app/widgets/gimpdeviceeditor.c |    8 +++-----
 app/widgets/gimpdeviceeditor.h |    4 ++--
 themes/Default/gtkrc           |    1 +
 themes/Small/gtkrc             |    1 +
 4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index 48387a5..a1c2263 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -107,7 +107,7 @@ static void   gimp_device_editor_delete_clicked (GtkWidget         *button,
                                                  GimpDeviceEditor  *editor);
 
 
-G_DEFINE_TYPE (GimpDeviceEditor, gimp_device_editor, GTK_TYPE_BOX)
+G_DEFINE_TYPE (GimpDeviceEditor, gimp_device_editor, GTK_TYPE_PANED)
 
 #define parent_class gimp_device_editor_parent_class
 
@@ -145,15 +145,13 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
   gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
                                   GTK_ORIENTATION_HORIZONTAL);
 
-  gtk_box_set_spacing (GTK_BOX (editor), 12);
-
   gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (editor)),
                                      GTK_ICON_SIZE_BUTTON,
                                      &icon_width, &icon_height);
 
   private->treeview = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
   gtk_widget_set_size_request (private->treeview, 200, -1);
-  gtk_box_pack_start (GTK_BOX (editor), private->treeview, FALSE, FALSE, 0);
+  gtk_paned_pack1 (GTK_PANED (editor), private->treeview, FALSE, TRUE);
   gtk_widget_show (private->treeview);
 
   g_signal_connect_object (private->treeview, "select-item",
@@ -172,7 +170,7 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
   gtk_widget_set_sensitive (private->delete_button, FALSE);
 
   vbox = gtk_vbox_new (FALSE, 12);
-  gtk_box_pack_start (GTK_BOX (editor), vbox, TRUE, TRUE, 0);
+  gtk_paned_pack2 (GTK_PANED (editor), vbox, TRUE, TRUE);
   gtk_widget_show (vbox);
 
   ebox = gtk_event_box_new ();
diff --git a/app/widgets/gimpdeviceeditor.h b/app/widgets/gimpdeviceeditor.h
index 893416d..f8d8ed8 100644
--- a/app/widgets/gimpdeviceeditor.h
+++ b/app/widgets/gimpdeviceeditor.h
@@ -34,12 +34,12 @@ typedef struct _GimpDeviceEditorClass GimpDeviceEditorClass;
 
 struct _GimpDeviceEditor
 {
-  GtkBox  parent_instance;
+  GtkPaned  parent_instance;
 };
 
 struct _GimpDeviceEditorClass
 {
-  GtkBoxClass  parent_class;
+  GtkPanedClass  parent_class;
 };
 
 
diff --git a/themes/Default/gtkrc b/themes/Default/gtkrc
index f8131bc..9b27d83 100644
--- a/themes/Default/gtkrc
+++ b/themes/Default/gtkrc
@@ -47,6 +47,7 @@ style "gimp-default-style"
   GimpDockbook::tab-icon-size       = button
   GimpColorNotebook::tab-border     = 0
   GimpColorNotebook::tab-icon-size  = button
+  GimpDeviceEditor::handle-size     = 12
   GimpDockable::content-border      = 2
   GimpEditor::content-spacing       = 2
   GimpEditor::button-spacing        = 2
diff --git a/themes/Small/gtkrc b/themes/Small/gtkrc
index 2ac835e..9b8b47c 100644
--- a/themes/Small/gtkrc
+++ b/themes/Small/gtkrc
@@ -54,6 +54,7 @@ style "gimp-default-style"
   GimpDockbook::tab-icon-size       = menu
   GimpColorNotebook::tab-border     = 0
   GimpColorNotebook::tab-icon-size  = menu
+  GimpDeviceEditor::handle-size     = 12
   GimpDockable::content-border      = 1
   GimpEditor::content-spacing       = 1
   GimpEditor::button-spacing        = 1



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