| 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); |
| 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); |