summaryrefslogtreecommitdiff
path: root/gtk/window.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-02-20 21:28:24 +0000
committerVincent Sanders <vince@netsurf-browser.org>2012-02-20 21:28:24 +0000
commit8e3e8f2ca101355c98d74cf535d2673f08f859a6 (patch)
tree3509a6522dc5765d015d7765f89950a0a1b1632c /gtk/window.c
parentf0708c3f9b13c2d0d8bc6b431ca436151f214837 (diff)
downloadnetsurf-8e3e8f2ca101355c98d74cf535d2673f08f859a6.tar.gz
remove unused scrolledwindow member
svn path=/trunk/netsurf/; revision=13452
Diffstat (limited to 'gtk/window.c')
-rw-r--r--gtk/window.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/gtk/window.c b/gtk/window.c
index d2f0d238a..1b4d4e0bb 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -74,9 +74,6 @@ struct gui_window {
/** display widget for this page or frame */
GtkLayout *layout;
- /** frames only; top level of gtk structure of gui_window */
- GtkScrolledWindow *scrolledwindow;
-
/** handle to the the visible tab */
GtkWidget *tab;
@@ -513,7 +510,6 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
bool new_tab)
{
struct gui_window *g; /**< what we're creating to return */
- GtkPolicyType scrollpolicy;
g = calloc(1, sizeof(*g));
if (!g) {
@@ -590,23 +586,6 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g_object_unref(xml);
- switch(bw->scrolling) {
- case SCROLLING_NO:
- scrollpolicy = GTK_POLICY_NEVER;
- break;
- case SCROLLING_YES:
- scrollpolicy = GTK_POLICY_ALWAYS;
- break;
- case SCROLLING_AUTO:
- default:
- scrollpolicy = GTK_POLICY_AUTOMATIC;
- break;
- }
-
- if (g->scrolledwindow)
- gtk_scrolled_window_set_policy(g->scrolledwindow,
- scrollpolicy, scrollpolicy);
-
/* Attach ourselves to the list (push_top) */
if (window_list)
window_list->prev = g;
@@ -711,16 +690,12 @@ void gui_window_destroy(struct gui_window *g)
LOG((" Scaffolding: %p", g->scaffold));
LOG((" Window name: %s", g->bw->name));
- if (g->scrolledwindow == NULL) {
- /* tab => remove tab */
- gtk_widget_destroy(gtk_widget_get_parent(GTK_WIDGET(g->layout)));
- /* if it was the last tab, destroy scaffold too */
- gint numbertabs = gtk_notebook_get_n_pages(nsgtk_scaffolding_notebook(g->scaffold));
- if (numbertabs == 0)
- nsgtk_scaffolding_destroy(g->scaffold);
- } else {
- /* frame within a document => destroy frame only */
- gtk_widget_destroy(GTK_WIDGET(g->scrolledwindow));
+ /* tab => remove tab */
+ gtk_widget_destroy(gtk_widget_get_parent(GTK_WIDGET(g->layout)));
+
+ /* if it was the last tab, destroy scaffold too */
+ if (gtk_notebook_get_n_pages(nsgtk_scaffolding_notebook(g->scaffold)) == 0) {
+ nsgtk_scaffolding_destroy(g->scaffold);
}
free(g);