~ubuntu-branches/ubuntu/oneiric/gimp/oneiric-security

« back to all changes in this revision

Viewing changes to debian/patches/04_gimp-statusbar.patch

  • Committer: Package Import Robot
  • Author(s): Bhaskar Kandiyal
  • Date: 2010-04-13 17:09:23 UTC
  • Revision ID: package-import@ubuntu.com-20100413170923-uog7ep694dk49s42
Tags: 2.6.8-2ubuntu1.1
* debian/patches/04_gimp-statusbar.patch:
  + Fixes bug where some elements are not shown in the statusbar (LP: #537275) 
    Origin: upstream commit 501c4f65f08c111df0654cb887d95c2c06e82710

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' gimp-2.6.8/app/display/gimpstatusbar.c gimp-2.6.8.new/app/display/gimpstatusbar.c
 
2
--- gimp-2.6.8/app/display/gimpstatusbar.c      2009-07-21 01:50:51.000000000 +0530
 
3
+++ gimp-2.6.8.new/app/display/gimpstatusbar.c  2010-04-13 17:09:07.626828984 +0530
 
4
@@ -49,6 +49,9 @@
 
5
 /*  maximal width of the string holding the cursor-coordinates  */
 
6
 #define CURSOR_LEN        256
 
7
 
 
8
+/*  the spacing of the hbox                                     */
 
9
+#define HBOX_SPACING        1
 
10
+
 
11
 /*  spacing between the icon and the statusbar label            */
 
12
 #define ICON_SPACING        2
 
13
 
 
14
@@ -152,6 +155,7 @@
 
15
 gimp_statusbar_init (GimpStatusbar *statusbar)
 
16
 {
 
17
   GtkWidget     *hbox;
 
18
+  GtkWidget     *label;
 
19
   GtkWidget     *image;
 
20
   GimpUnitStore *store;
 
21
 
 
22
@@ -171,13 +175,27 @@
 
23
   statusbar->progress_active      = FALSE;
 
24
   statusbar->progress_shown       = FALSE;
 
25
 
 
26
-  /* remove the label and insert a hbox */
 
27
-  gtk_container_remove (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame),
 
28
-                        g_object_ref (GTK_STATUSBAR (statusbar)->label));
 
29
-
 
30
-  hbox = gtk_hbox_new (FALSE, 1);
 
31
-  gtk_container_add (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame), hbox);
 
32
-  gtk_widget_show (hbox);
 
33
+  label = g_object_ref (GTK_STATUSBAR (statusbar)->label);
 
34
+
 
35
+  /* remove the message area or label and insert a hbox */
 
36
+#if GTK_CHECK_VERSION (2, 19, 1)
 
37
+  {
 
38
+    hbox = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
 
39
+    gtk_box_set_spacing (GTK_BOX (hbox), HBOX_SPACING);
 
40
+    gtk_container_remove (GTK_CONTAINER (hbox), label);
 
41
+  }
 
42
+#else
 
43
+  {
 
44
+    GtkWidget *label_parent;
 
45
+
 
46
+    label_parent = gtk_widget_get_parent (label);
 
47
+    gtk_container_remove (GTK_CONTAINER (label_parent), label);
 
48
+
 
49
+    hbox = gtk_hbox_new (FALSE, HBOX_SPACING);
 
50
+    gtk_container_add (GTK_CONTAINER (label_parent), hbox);
 
51
+    gtk_widget_show (hbox);
 
52
+  }
 
53
+#endif
 
54
 
 
55
   statusbar->cursor_label = gtk_label_new ("8888, 8888");
 
56
   gtk_misc_set_alignment (GTK_MISC (statusbar->cursor_label), 0.5, 0.5);