[gimp/gtk3-port: 219/228] 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: 219/228] app: don't use "size-request" for the toolbox' wilber, it's gone
- Date: Mon, 14 Jan 2013 01:18:27 +0000 (UTC)
commit 6b3ab5ab9950004c79cde73920204ab086f6e782
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 f53c20d..c33f3ca 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -123,8 +123,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);
@@ -238,8 +237,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),
@@ -634,9 +633,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;
@@ -644,13 +642,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]