summaryrefslogtreecommitdiff
path: root/packages/gaim/files/08-prefs-dialog.patch
blob: a8fcb893113bd78337130cb33fd0471fd96f5c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- gaim.ori/src/gtkprefs.c	2005-09-05 08:28:17.000000000 +0200
+++ gaim/src/gtkprefs.c	2005-09-05 09:06:27.000000000 +0200
@@ -2108,12 +2108,18 @@
 	if (icon)
 		g_object_unref(icon);
 
-#if GTK_CHECK_VERSION(2,4,0)
-	return gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text));
-#else
-	gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text));
-	return gtk_notebook_page_num(GTK_NOTEBOOK(prefsnotebook), page);
-#endif
+	//Add a scrolled window around the page contents
+	GtkWidget *sw;
+	sw = gtk_scrolled_window_new(NULL, NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
+		GTK_SHADOW_NONE);
+	//gtk_widget_set_size_request(sw, -1, 200);
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), page);
+	
+	
+	return gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), sw, gtk_label_new(text));
 }
 
 static void prefs_notebook_init() {
@@ -2146,9 +2152,9 @@
 void gaim_gtk_prefs_show(void)
 {
 	GtkWidget *vbox;
-	GtkWidget *bbox;
+	//GtkWidget *bbox;
 	GtkWidget *notebook;
-	GtkWidget *button;
+	//GtkWidget *button;
 
 	if (prefs) {
 		gtk_window_present(GTK_WINDOW(prefs));
@@ -2176,11 +2182,13 @@
 
 	/* The notebook */
 	prefsnotebook = notebook = gtk_notebook_new ();
-	gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0);
+	gtk_notebook_set_scrollable(GTK_NOTEBOOK(prefsnotebook), TRUE);
+	gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
 
 
 	/* The buttons to press! */
-	bbox = gtk_hbutton_box_new();
+	//To save screen estate we will do without a close button
+	/*bbox = gtk_hbutton_box_new();
 	gtk_box_set_spacing(GTK_BOX(bbox), GAIM_HIG_BOX_SPACE);
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
 	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
@@ -2190,7 +2198,7 @@
 	g_signal_connect_swapped(G_OBJECT(button), "clicked",
 							 G_CALLBACK(gtk_widget_destroy), prefs);
 	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-	gtk_widget_show(button);
+	gtk_widget_show(button);*/
 
 	prefs_notebook_init();