From 4e0fb4ca5c8ccfa7f22e5da25ed5894c23f3b965 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 2 Jun 2014 16:27:57 +0200 Subject: [PATCH] Removed unused properties from global scope. --- src/main.c | 12 ++++++------ src/main.h | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main.c b/src/main.c index 9dfb702..306d094 100644 --- a/src/main.c +++ b/src/main.c @@ -677,9 +677,9 @@ static void init_core(void) gui->inspector = webkit_web_view_get_inspector(gui->webview); /* Create a scrollable area */ - gui->scroll = gtk_scrolled_window_new(NULL, NULL); - gui->adjust_h = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(gui->scroll)); - gui->adjust_v = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(gui->scroll)); + GtkWidget *scroll = gtk_scrolled_window_new(NULL, NULL); + gui->adjust_h = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(scroll)); + gui->adjust_v = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll)); #ifdef FEATURE_NO_SCROLLBARS #ifdef HAS_GTK3 @@ -696,7 +696,7 @@ static void init_core(void) ); #else /* no GTK3 */ /* GTK_POLICY_NEVER with gtk3 disallows window resizing and scrolling */ - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gui->scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER); #endif #endif @@ -723,7 +723,7 @@ static void init_core(void) gtk_paned_pack1(GTK_PANED(gui->pane), GTK_WIDGET(gui->box), true, true); /* Put all part together */ - gtk_container_add(GTK_CONTAINER(gui->scroll), GTK_WIDGET(gui->webview)); + gtk_container_add(GTK_CONTAINER(scroll), GTK_WIDGET(gui->webview)); gtk_container_add(GTK_CONTAINER(gui->eventbox), GTK_WIDGET(gui->statusbar.box)); gtk_container_add(GTK_CONTAINER(gui->window), GTK_WIDGET(gui->pane)); gtk_misc_set_alignment(GTK_MISC(gui->statusbar.left), 0.0, 0.0); @@ -733,7 +733,7 @@ static void init_core(void) gtk_box_pack_start(gui->statusbar.box, gui->statusbar.cmd, false, false, 0); gtk_box_pack_start(gui->statusbar.box, gui->statusbar.right, false, false, 2); - gtk_box_pack_start(gui->box, gui->scroll, true, true, 0); + gtk_box_pack_start(gui->box, scroll, true, true, 0); gtk_box_pack_start(gui->box, gui->eventbox, false, false, 0); gtk_box_pack_end(gui->box, gui->input, false, false, 0); diff --git a/src/main.h b/src/main.h index 2ad4e6f..09bd81d 100644 --- a/src/main.h +++ b/src/main.h @@ -266,7 +266,6 @@ typedef struct { /* gui */ typedef struct { GtkWidget *window; - GtkWidget *scroll; WebKitWebView *webview; WebKitWebInspector *inspector; GtkBox *box; @@ -275,8 +274,6 @@ typedef struct { GtkTextBuffer *buffer; /* text buffer associated with the input for fast access */ GtkWidget *pane; StatusBar statusbar; - GtkScrollbar *sb_h; - GtkScrollbar *sb_v; GtkAdjustment *adjust_h; GtkAdjustment *adjust_v; } Gui; -- 2.20.1