[gimp/gtk3-port: 217/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: 217/227] app: don't use "size-request" for the toolbox' wilber, it's gone
- Date: Mon, 10 Feb 2014 22:11:16 +0000 (UTC)
commit d5759b03bc604e1809cd1265fb5db4cb5dc87d6b
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 ba4950c..d99d8d8 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);
@@ -236,8 +235,8 @@ gimp_toolbox_constructed (GObject *object)
toolbox->p->header, "visible",
G_BINDING_SYNC_CREATE);
- 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),
@@ -622,9 +621,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;
@@ -632,13 +630,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]