[gimp/gtk3-port: 221/227] app: don't use "size-request" for the toolbox' wilber, it's gone
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 221/227] app: don't use "size-request" for the toolbox' wilber, it's gone
- Date: Fri, 30 Mar 2012 09:19:33 +0000 (UTC)
commit dcc3271ee9fcc05b60b5e94b44943b7d3e97448c
Author: Michael Natterer <mitch gimp org>
Date: Fri Nov 4 00:28:04 2011 +0100
app: don't use "size-request" for the toolbox' wilber, it's gone
app/widgets/gimptoolbox.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index fd3fbe7..d758567 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -122,8 +122,7 @@ static void gimp_toolbox_book_added (GimpDock *dock,
GimpDockbook *dockbook);
static void gimp_toolbox_book_removed (GimpDock *dock,
GimpDockbook *dockbook);
-static void gimp_toolbox_size_request_wilber (GtkWidget *widget,
- GtkRequisition *requisition,
+static void gimp_toolbox_wilber_style_updated (GtkWidget *widget,
GimpToolbox *toolbox);
static gboolean gimp_toolbox_draw_wilber (GtkWidget *widget,
cairo_t *cr);
@@ -239,8 +238,8 @@ gimp_toolbox_constructed (GObject *object)
if (config->toolbox_wilber)
gtk_widget_show (toolbox->p->header);
- g_signal_connect (toolbox->p->header, "size-request",
- G_CALLBACK (gimp_toolbox_size_request_wilber),
+ g_signal_connect (toolbox->p->header, "style-updated",
+ G_CALLBACK (gimp_toolbox_wilber_style_updated),
toolbox);
g_signal_connect (toolbox->p->header, "draw",
G_CALLBACK (gimp_toolbox_draw_wilber),
@@ -639,9 +638,8 @@ gimp_toolbox_set_drag_handler (GimpToolbox *toolbox,
/* private functions */
static void
-gimp_toolbox_size_request_wilber (GtkWidget *widget,
- GtkRequisition *requisition,
- GimpToolbox *toolbox)
+gimp_toolbox_wilber_style_updated (GtkWidget *widget,
+ GimpToolbox *toolbox)
{
gint button_width;
gint button_height;
@@ -649,13 +647,9 @@ gimp_toolbox_size_request_wilber (GtkWidget *widget,
if (gimp_tool_palette_get_button_size (GIMP_TOOL_PALETTE (toolbox->p->tool_palette),
&button_width, &button_height))
{
- requisition->width = button_width * PANGO_SCALE_SMALL;
- requisition->height = button_height * PANGO_SCALE_SMALL;
- }
- else
- {
- requisition->width = 16;
- requisition->height = 16;
+ gtk_widget_set_size_request (widget,
+ button_width * PANGO_SCALE_SMALL,
+ button_height * PANGO_SCALE_SMALL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]