diff options
author | Federico Mena Quintero <federico@gnome.org> | 2015-04-17 10:19:40 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2015-04-17 10:26:14 -0500 |
commit | f14a347421b26e2887b66b1988c700a76377f72c (patch) | |
tree | 8de056314f954548e3b5364cd3e271c0c633e344 | |
parent | fcd51dad24dfd1125bcac96fe0feb9ec2525fdb0 (diff) | |
download | librsvg-f14a347421b26e2887b66b1988c700a76377f72c.tar.gz |
test-display: Remove dead code
-rw-r--r-- | test-display.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/test-display.c b/test-display.c index cc97a44b..8c5f56c3 100644 --- a/test-display.c +++ b/test-display.c @@ -35,9 +35,6 @@ #include <gio/gunixinputstream.h> #endif -#define DEFAULT_WIDTH 640 -#define DEFAULT_HEIGHT 480 - /* RsvgImage */ #define RSVG_TYPE_IMAGE (rsvg_image_get_type ()) @@ -509,24 +506,16 @@ tool_button_new (const char *icon_name) static void populate_window (GtkWidget * win, ViewerCbInfo * info, - cairo_surface_t *surface /* adopted */, - gint win_width, - gint win_height) + cairo_surface_t *surface /* adopted */) { GtkWidget *vbox; GtkWidget *scroll; GtkWidget *toolbar; GtkToolItem *toolitem; - GtkRequisition requisition; - gint img_width, img_height; vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (win), vbox); - /* pack the window with the image */ - img_width = cairo_image_surface_get_width (surface); - img_height = cairo_image_surface_get_height (surface); - /* create a new image */ info->image = rsvg_image_new_take_surface (surface); @@ -541,14 +530,6 @@ populate_window (GtkWidget * win, gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, 1); g_signal_connect (toolitem, "clicked", G_CALLBACK (zoom_out), info); - gtk_widget_size_request(toolbar, &requisition); - - /* HACK: adjust for frame width & height + packing borders */ - img_height += requisition.height + 30; - win_height += requisition.height + 30; - img_width += 20; - win_width += 20; - scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); @@ -564,16 +545,12 @@ view_surface (ViewerCbInfo * info, { GtkWidget *win; GdkColor bg_color; - gint win_width, win_height; /* create toplevel window and set its title */ win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - win_width = DEFAULT_WIDTH; - win_height = DEFAULT_HEIGHT; - - populate_window (win, info, surface, win_width, win_height); + populate_window (win, info, surface); /* exit when 'X' is clicked */ g_signal_connect (win, "destroy", G_CALLBACK (quit_cb), NULL); |