pidgin/gtkprefs.c

branch
cpw.qulogic.gtk3
changeset 32394
f883709bdba4
parent 32391
5f9f23a48f82
child 32414
8c5d1edf9da2
equal deleted inserted replaced
32393:69f260ac8ea8 32394:f883709bdba4
116 GtkWidget * 116 GtkWidget *
117 pidgin_prefs_labeled_spin_button(GtkWidget *box, const gchar *title, 117 pidgin_prefs_labeled_spin_button(GtkWidget *box, const gchar *title,
118 const char *key, int min, int max, GtkSizeGroup *sg) 118 const char *key, int min, int max, GtkSizeGroup *sg)
119 { 119 {
120 GtkWidget *spin; 120 GtkWidget *spin;
121 GtkObject *adjust; 121 GtkAdjustment *adjust;
122 int val; 122 int val;
123 123
124 val = purple_prefs_get_int(key); 124 val = purple_prefs_get_int(key);
125 125
126 adjust = gtk_adjustment_new(val, min, max, 1, 1, 0); 126 adjust = gtk_adjustment_new(val, min, max, 1, 1, 0);
862 862
863 static void 863 static void
864 theme_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, 864 theme_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y,
865 GtkSelectionData *sd, guint info, guint t, gpointer user_data) 865 GtkSelectionData *sd, guint info, guint t, gpointer user_data)
866 { 866 {
867 gchar *name = g_strchomp((gchar *)sd->data); 867 gchar *name = g_strchomp((gchar *)gtk_selection_data_get_data(sd));
868 868
869 if ((sd->length >= 0) && (sd->format == 8)) { 869 if ((gtk_selection_data_get_length(sd) >= 0)
870 && (gtk_selection_data_get_format(sd) == 8)) {
870 /* Well, it looks like the drag event was cool. 871 /* Well, it looks like the drag event was cool.
871 * Let's do something with it */ 872 * Let's do something with it */
872 gchar *temp; 873 gchar *temp;
873 struct theme_info *info = g_new0(struct theme_info, 1); 874 struct theme_info *info = g_new0(struct theme_info, 1);
874 info->type = g_strdup((gchar *)user_data); 875 info->type = g_strdup((gchar *)user_data);
2440 2441
2441 static GtkWidget * 2442 static GtkWidget *
2442 sound_page(void) 2443 sound_page(void)
2443 { 2444 {
2444 GtkWidget *ret; 2445 GtkWidget *ret;
2445 GtkWidget *vbox, *vbox2, *sw, *button; 2446 GtkWidget *vbox, *vbox2, *sw, *button, *parent, *parent_parent, *parent_parent_parent;
2446 GtkSizeGroup *sg; 2447 GtkSizeGroup *sg;
2447 GtkTreeIter iter; 2448 GtkTreeIter iter;
2448 GtkWidget *event_view; 2449 GtkWidget *event_view;
2449 GtkListStore *event_store; 2450 GtkListStore *event_store;
2450 GtkCellRenderer *rend; 2451 GtkCellRenderer *rend;
2537 strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method"), "none")); 2538 strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method"), "none"));
2538 purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method", 2539 purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method",
2539 sound_changed2_cb, vbox); 2540 sound_changed2_cb, vbox);
2540 #endif 2541 #endif
2541 vbox = pidgin_make_frame(ret, _("Sound Events")); 2542 vbox = pidgin_make_frame(ret, _("Sound Events"));
2542 2543 parent = gtk_widget_get_parent(vbox);
2544 parent_parent = gtk_widget_get_parent(parent);
2545 parent_parent_parent = gtk_widget_get_parent(parent_parent);
2546
2543 /* The following is an ugly hack to make the frame expand so the 2547 /* The following is an ugly hack to make the frame expand so the
2544 * sound events list is big enough to be usable */ 2548 * sound events list is big enough to be usable */
2545 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, 2549 gtk_box_set_child_packing(GTK_BOX(parent), vbox, TRUE, TRUE, 0,
2546 GTK_PACK_START); 2550 GTK_PACK_START);
2547 gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent), vbox->parent, TRUE, 2551 gtk_box_set_child_packing(GTK_BOX(parent_parent),
2548 TRUE, 0, GTK_PACK_START); 2552 parent, TRUE, TRUE, 0, GTK_PACK_START);
2549 gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent->parent), 2553 gtk_box_set_child_packing(
2550 vbox->parent->parent, TRUE, TRUE, 0, GTK_PACK_START); 2554 GTK_BOX(parent_parent_parent),
2555 parent_parent, TRUE, TRUE, 0, GTK_PACK_START);
2551 2556
2552 /* SOUND SELECTION */ 2557 /* SOUND SELECTION */
2553 sw = gtk_scrolled_window_new(NULL,NULL); 2558 sw = gtk_scrolled_window_new(NULL,NULL);
2554 gtk_widget_set_size_request(sw, -1, 100); 2559 gtk_widget_set_size_request(sw, -1, 100);
2555 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); 2560 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);

mercurial