[gimp/gtk3-port: 215/226] devel-docs: make the shooter tool at least build again (untested)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 215/226] devel-docs: make the shooter tool at least build again (untested)
- Date: Thu, 2 Jan 2014 19:36:31 +0000 (UTC)
commit f66e23c14a8b00cff804d5f9e95aec609ec70857
Author: Michael Natterer <mitch gimp org>
Date: Mon Sep 26 01:21:21 2011 +0200
devel-docs: make the shooter tool at least build again (untested)
devel-docs/tools/shooter.c | 6 +++---
devel-docs/tools/widgets.c | 25 +++++--------------------
2 files changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/devel-docs/tools/shooter.c b/devel-docs/tools/shooter.c
index d1c7fa7..be479a3 100644
--- a/devel-docs/tools/shooter.c
+++ b/devel-docs/tools/shooter.c
@@ -175,8 +175,8 @@ take_window_shot (Window child,
if (y_orig + height > gdk_screen_get_height (screen))
height = gdk_screen_get_height (screen) - y_orig;
- tmp = gdk_pixbuf_get_from_drawable (NULL, window, NULL,
- x, y, 0, 0, width, height);
+ tmp = gdk_pixbuf_get_from_window (window,
+ x, y, width, height);
if (include_decoration)
tmp2 = remove_shaped_area (tmp, xid);
@@ -284,7 +284,7 @@ main (int argc, char **argv)
gtk_main_iteration ();
}
- xid = gdk_x11_drawable_get_xid (GDK_DRAWABLE (window));
+ xid = gdk_x11_window_get_xid (window);
screenshot = take_window_shot (xid, info->include_decorations);
filename = g_strdup_printf ("%s.png", info->name);
diff --git a/devel-docs/tools/widgets.c b/devel-docs/tools/widgets.c
index 54b9efb..c4dbbeb 100644
--- a/devel-docs/tools/widgets.c
+++ b/devel-docs/tools/widgets.c
@@ -26,6 +26,7 @@
#define LARGE_HEIGHT 240
+#if 0
static gboolean
adjust_size_callback (WidgetInfo *info)
{
@@ -80,6 +81,7 @@ realize_callback (WidgetInfo *info)
{
g_timeout_add (500, (GSourceFunc)adjust_size_callback, info);
}
+#endif
static WidgetInfo *
new_widget_info (const char *name,
@@ -99,8 +101,10 @@ new_widget_info (const char *name,
info->window = widget;
gtk_window_set_resizable (GTK_WINDOW (info->window), FALSE);
+#if 0
g_signal_connect_swapped (info->window, "realize",
G_CALLBACK (realize_callback), info);
+#endif
}
else
{
@@ -168,7 +172,7 @@ create_browser (void)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
browser = gimp_browser_new ();
- gtk_box_pack_start (GTK_BOX (GIMP_BROWSER (browser)->left_vbox),
+ gtk_box_pack_start (GTK_BOX (gimp_browser_get_left_vbox (GIMP_BROWSER (browser))),
gtk_label_new ("TreeView goes here"), TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (align), browser);
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
@@ -702,24 +706,6 @@ create_string_combo_box (void)
return new_widget_info ("gimp-string-combo-box", vbox, SMALL);
}
-static WidgetInfo *
-create_unit_menu (void)
-{
- GtkWidget *vbox;
- GtkWidget *menu;
- GtkWidget *align;
-
- vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
- menu = gimp_unit_menu_new ("%p", GIMP_UNIT_MM, TRUE, FALSE, FALSE);
- gtk_container_add (GTK_CONTAINER (align), menu);
- gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox),
- gtk_label_new ("Unit Menu"), FALSE, FALSE, 0);
-
- return new_widget_info ("gimp-unit-menu", vbox, SMALL);
-}
-
GList *
get_all_widgets (void)
{
@@ -749,7 +735,6 @@ get_all_widgets (void)
retval = g_list_append (retval, create_pick_button ());
retval = g_list_append (retval, create_preview_area ());
retval = g_list_append (retval, create_string_combo_box ());
- retval = g_list_append (retval, create_unit_menu ());
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]