1 Identiske underkataloger: src2/CVS og src/CVS
2 Identiske underkataloger: src2/.deps og src/.deps
3 Index: gaim/src/gtkgaim.h
4 ===================================================================
5 --- gaim.orig/src/gtkgaim.h 2005-08-19 21:46:09.550560256 +0200
6 +++ gaim/src/gtkgaim.h 2005-08-19 21:47:37.276223928 +0200
9 #define ICONS_IN_DIALOGS 0
12 + * How many fields is there screen-space for vertically, before a scrollbar is needed?
17 #endif /* _GAIM_GTKGAIM_H_ */
19 Index: gaim/src/gtkrequest.c
20 ===================================================================
21 --- gaim.orig/src/gtkrequest.c 2005-08-19 21:46:09.550560256 +0200
22 +++ gaim/src/gtkrequest.c 2005-08-19 21:53:46.782050504 +0200
27 + GtkWidget *pri_label;
28 + GtkWidget *sec_label;
31 GaimRequestFieldGroup *group;
33 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
34 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
35 gtk_widget_show(label);
42 total_fields += g_list_length(gaim_request_field_group_get_fields(gl->data));
44 - if(total_fields > 9) {
45 + if(total_fields > VERT_ITEMS) {
46 sw = gtk_scrolled_window_new(NULL, NULL);
47 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
48 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
50 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
51 gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0);
52 gtk_widget_show(label);
56 for (gl = gaim_request_fields_get_groups(fields);
57 @@ -1718,6 +1722,59 @@
61 + //Wait for the window to have recieved its "configure_event",
62 + //which means it has been resized by the WM
63 + while (gtk_events_pending ()) gtk_main_iteration ();
65 + //Get allocated size, and adjust widgets accordingly
66 + int w, h, field_labels_w;
67 + GtkRequisition sg_labels_req;
68 + gtk_window_get_size(GTK_WINDOW(win), &w, &h);
69 + field_labels_w = label->allocation.width + GAIM_HIG_BORDER*2; //The width of the largest field-label
71 + printf("%d / %d\n", field_labels_w, w);
73 + w = w - GAIM_HIG_BORDER * 2;
74 + if (primary) gtk_widget_set_size_request(GTK_WIDGET(pri_label), w, -1);
75 + if (secondary) gtk_widget_set_size_request(GTK_WIDGET(sec_label), w, -1);
77 + //Determine what to do - add a scrollbar or resize the input fields?
78 + if ((float)field_labels_w / w > 0.5) //if the labels fill more than half the screen add a horizontal scrollbar
80 + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
81 + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
83 + else //resize the input fields
85 + for (gl = gaim_request_fields_get_groups(fields);
90 + size_t field_count = 0;
97 + field_list = gaim_request_field_group_get_fields(group);
99 + for (row_num = 0, fl = field_list;
100 + row_num < rows && fl != NULL;
104 + col_num < cols && fl != NULL;
105 + col_num++, fl = fl->next)
108 + gtk_widget_set_size_request(GTK_WIDGET(field->ui_data), w-field_labels_w, -1);