From 4722267d308357f2d1d59a1ad749fbbb8ebc508b Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 7 May 2004 23:31:01 +0000 Subject: [PATCH] renamed struct member combo to unit_combo. Place the combobox into the 2004-05-08 Sven Neumann * app/display/gimpstatusbar.[ch]: renamed struct member combo to unit_combo. Place the combobox into the cursor frame. --- ChangeLog | 5 +++++ app/display/gimpstatusbar.c | 27 ++++++++++++++++----------- app/display/gimpstatusbar.h | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 996055038c..234c88e780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-08 Sven Neumann + + * app/display/gimpstatusbar.[ch]: renamed struct member combo to + unit_combo. Place the combobox into the cursor frame. + 2004-05-08 Sven Neumann * app/widgets/Makefile.am diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c index 2b1dd83c48..b8563d3e85 100644 --- a/app/display/gimpstatusbar.c +++ b/app/display/gimpstatusbar.c @@ -103,6 +103,7 @@ gimp_statusbar_init (GimpStatusbar *statusbar) { GtkStatusbar *gtk_statusbar; GtkBox *box; + GtkWidget *hbox; GimpUnitStore *store; GtkShadowType shadow_type; @@ -125,20 +126,23 @@ gimp_statusbar_init (GimpStatusbar *statusbar) gtk_box_reorder_child (box, statusbar->cursor_frame, 0); gtk_widget_show (statusbar->cursor_frame); + hbox = gtk_hbox_new (FALSE, 1); + gtk_container_add (GTK_CONTAINER (statusbar->cursor_frame), hbox); + gtk_widget_show (hbox); + statusbar->cursor_label = gtk_label_new ("0, 0"); gtk_misc_set_alignment (GTK_MISC (statusbar->cursor_label), 0.5, 0.5); - gtk_container_add (GTK_CONTAINER (statusbar->cursor_frame), - statusbar->cursor_label); + gtk_container_add (GTK_CONTAINER (hbox), statusbar->cursor_label); gtk_widget_show (statusbar->cursor_label); store = gimp_unit_store_new (2); - statusbar->combo = gimp_unit_combo_box_new_with_model (store); + statusbar->unit_combo = gimp_unit_combo_box_new_with_model (store); g_object_unref (store); - gtk_box_pack_start (box, statusbar->combo, FALSE, FALSE, 0); - gtk_widget_show (statusbar->combo); + gtk_container_add (GTK_CONTAINER (hbox), statusbar->unit_combo); + gtk_widget_show (statusbar->unit_combo); - g_signal_connect (statusbar->combo, "changed", + g_signal_connect (statusbar->unit_combo, "changed", G_CALLBACK (gimp_statusbar_unit_changed), statusbar); @@ -305,14 +309,15 @@ gimp_statusbar_resize_cursor (GimpStatusbar *statusbar) shell = statusbar->shell; gimage = shell->gdisp->gimage; - model = gtk_combo_box_get_model (GTK_COMBO_BOX (statusbar->combo)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (statusbar->unit_combo)); gimp_unit_store_set_resolutions (GIMP_UNIT_STORE (model), gimage->xresolution, gimage->yresolution); - g_signal_handlers_block_by_func (statusbar->combo, + g_signal_handlers_block_by_func (statusbar->unit_combo, gimp_statusbar_unit_changed, statusbar); - gtk_combo_box_set_active (GTK_COMBO_BOX (statusbar->combo), gimage->unit); - g_signal_handlers_unblock_by_func (statusbar->combo, + gtk_combo_box_set_active (GTK_COMBO_BOX (statusbar->unit_combo), + gimage->unit); + g_signal_handlers_unblock_by_func (statusbar->unit_combo, gimp_statusbar_unit_changed, statusbar); if (gimage->unit == GIMP_UNIT_PIXEL) @@ -368,7 +373,7 @@ gimp_statusbar_set_cursor (GimpStatusbar *statusbar, GimpUnitStore *store; gchar buffer[CURSOR_STR_LENGTH]; - model = gtk_combo_box_get_model (GTK_COMBO_BOX (statusbar->combo)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (statusbar->unit_combo)); store = GIMP_UNIT_STORE (model); gimp_unit_store_set_pixel_values (store, x, y); diff --git a/app/display/gimpstatusbar.h b/app/display/gimpstatusbar.h index 016e76d884..1ee38dbcb7 100644 --- a/app/display/gimpstatusbar.h +++ b/app/display/gimpstatusbar.h @@ -47,7 +47,7 @@ struct _GimpStatusbar GtkWidget *cursor_frame; GtkWidget *cursor_label; gchar cursor_format_str[CURSOR_FORMAT_LENGTH]; - GtkWidget *combo; + GtkWidget *unit_combo; GtkWidget *progressbar; guint progressid;