[gimp/soc-2011-gimpunitentry] GimpUnitEntry: set widget size request



commit 8bc2f83a61e7376d18b0e4577a1869f2f489dcb8
Author: Enrico SchroÌder <enni schroeder gmail com>
Date:   Thu Jul 21 14:28:51 2011 +0200

    GimpUnitEntry: set widget size request

 libgimpwidgets/gimpunitentry.c |    4 +++-
 libgimpwidgets/gimpunitentry.h |    3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libgimpwidgets/gimpunitentry.c b/libgimpwidgets/gimpunitentry.c
index f5ccdda..57ac049 100644
--- a/libgimpwidgets/gimpunitentry.c
+++ b/libgimpwidgets/gimpunitentry.c
@@ -49,6 +49,7 @@
 #define UNIT_ENTRY_STRING_LENGTH  30
 #define UNIT_ENTRY_ERROR_TIMEOUT  2
 #define UNIT_ENTRY_ERROR_COLOR    "LightSalmon"
+#define UNIT_ENTRY_SIZE_REQUEST   200
 
 G_DEFINE_TYPE (GimpUnitEntry, gimp_unit_entry, GTK_TYPE_SPIN_BUTTON);
 
@@ -85,7 +86,6 @@ gimp_unit_entry_init (GimpUnitEntry *unitEntry)
   unitEntry->timer          = NULL;                            
 
   /* connect signals */
-  /* we don't need all of them... */
   g_signal_connect (&unitEntry->parent_instance, 
                     "output",
                     G_CALLBACK(gimp_unit_entry_output), 
@@ -102,6 +102,8 @@ gimp_unit_entry_init (GimpUnitEntry *unitEntry)
                     "populate-popup",
                     G_CALLBACK(gimp_unit_entry_populate_popup), 
                     NULL);
+
+  gtk_widget_set_size_request (GTK_WIDGET (unitEntry), UNIT_ENTRY_SIZE_REQUEST, -1);
 }
 
 static void
diff --git a/libgimpwidgets/gimpunitentry.h b/libgimpwidgets/gimpunitentry.h
index 7f6a691..96ec627 100644
--- a/libgimpwidgets/gimpunitentry.h
+++ b/libgimpwidgets/gimpunitentry.h
@@ -28,9 +28,6 @@
 
 G_BEGIN_DECLS
 
-/**
- * boiler-plate
- **/
 #define GIMP_TYPE_UNIT_ENTRY            (gimp_unit_entry_get_type ())
 #define GIMP_UNIT_ENTRY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_UNIT_ENTRY, GimpUnitEntry))
 #define GIMP_UNIT_ENTRY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_UNIT_ENTRY, GimpUnitEntryClass))



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