Mercurial > pidgin
comparison src/gtkroomlist.c @ 8199:12055bae7f59
[gaim-migrate @ 8922]
marv made the roomlist widget a lot cooler. thanks marv!
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 01 Feb 2004 05:02:13 +0000 |
parents | 596c64a2a2d0 |
children | 4e354776ae2a |
comparison
equal
deleted
inserted
replaced
8198:9f174d0222bd | 8199:12055bae7f59 |
---|---|
45 GtkWidget *window; | 45 GtkWidget *window; |
46 GtkWidget *account_widget; | 46 GtkWidget *account_widget; |
47 GtkWidget *progress; | 47 GtkWidget *progress; |
48 GtkWidget *sw; | 48 GtkWidget *sw; |
49 | 49 |
50 GtkWidget *stop_button; | |
50 GtkWidget *list_button; | 51 GtkWidget *list_button; |
51 GtkWidget *stop_button; | 52 GtkWidget *join_button; |
52 GtkWidget *close_button; | 53 GtkWidget *close_button; |
53 | 54 |
54 GaimAccount *account; | 55 GaimAccount *account; |
55 GaimRoomlist *roomlist; | 56 GaimRoomlist *roomlist; |
56 | |
57 }; | 57 }; |
58 | 58 |
59 enum { | 59 enum { |
60 NAME_COLUMN = 0, | 60 NAME_COLUMN = 0, |
61 ROOM_COLUMN, | 61 ROOM_COLUMN, |
62 NUM_OF_COLUMNS, | 62 NUM_OF_COLUMNS, |
63 }; | 63 }; |
64 | 64 |
65 static GList *roomlists = NULL; | 65 static GList *roomlists = NULL; |
66 | 66 |
67 | |
68 | |
69 static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) | 67 static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) |
70 { | 68 { |
71 GaimGtkRoomlistDialog *dialog; | 69 GaimGtkRoomlistDialog *dialog; |
72 | 70 |
73 dialog = (GaimGtkRoomlistDialog *) d; | 71 dialog = (GaimGtkRoomlistDialog *) d; |
72 | |
73 if (dialog->roomlist && gaim_roomlist_get_in_progress(dialog->roomlist)) | |
74 gaim_roomlist_cancel_get_list(dialog->roomlist); | |
74 | 75 |
75 /* free stuff here */ | 76 /* free stuff here */ |
76 if (dialog->roomlist) | 77 if (dialog->roomlist) |
77 gaim_roomlist_unref(dialog->roomlist); | 78 gaim_roomlist_unref(dialog->roomlist); |
78 g_free(dialog); | 79 g_free(dialog); |
93 | 94 |
94 gc = gaim_account_get_connection(dialog->account); | 95 gc = gaim_account_get_connection(dialog->account); |
95 if (!gc) | 96 if (!gc) |
96 return; | 97 return; |
97 | 98 |
99 if (dialog->roomlist != NULL) { | |
100 rl = dialog->roomlist->ui_data; | |
101 gtk_widget_destroy(rl->tree); | |
102 gaim_roomlist_unref(dialog->roomlist); | |
103 } | |
104 | |
98 dialog->roomlist = gaim_roomlist_get_list(gc); | 105 dialog->roomlist = gaim_roomlist_get_list(gc); |
99 gaim_roomlist_ref(dialog->roomlist); | 106 gaim_roomlist_ref(dialog->roomlist); |
100 rl = dialog->roomlist->ui_data; | 107 rl = dialog->roomlist->ui_data; |
101 rl->dialog = dialog; | 108 rl->dialog = dialog; |
109 | |
102 if (dialog->account_widget) | 110 if (dialog->account_widget) |
103 gtk_widget_set_sensitive(dialog->account_widget, FALSE); | 111 gtk_widget_set_sensitive(dialog->account_widget, FALSE); |
112 | |
113 gtk_container_add(GTK_CONTAINER(dialog->sw), rl->tree); | |
114 | |
115 gtk_widget_set_sensitive(dialog->stop_button, TRUE); | |
104 gtk_widget_set_sensitive(dialog->list_button, FALSE); | 116 gtk_widget_set_sensitive(dialog->list_button, FALSE); |
105 gtk_container_add(GTK_CONTAINER(dialog->sw), rl->tree); /* XXX */ | 117 gtk_widget_set_sensitive(dialog->join_button, FALSE); |
106 } | 118 } |
107 | 119 |
108 static void stop_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) | 120 static void stop_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) |
109 { | 121 { |
110 gaim_roomlist_cancel_get_list(dialog->roomlist); | 122 gaim_roomlist_cancel_get_list(dialog->roomlist); |
111 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); | 123 |
124 if (dialog->account_widget) | |
125 gtk_widget_set_sensitive(dialog->account_widget, TRUE); | |
126 | |
127 gtk_widget_set_sensitive(dialog->stop_button, FALSE); | |
128 gtk_widget_set_sensitive(dialog->list_button, TRUE); | |
129 gtk_widget_set_sensitive(dialog->join_button, FALSE); | |
112 } | 130 } |
113 | 131 |
114 static void close_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) | 132 static void close_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) |
115 { | 133 { |
116 GtkWidget *window = dialog->window; | 134 GtkWidget *window = dialog->window; |
122 struct _menu_cb_info { | 140 struct _menu_cb_info { |
123 GaimRoomlist *list; | 141 GaimRoomlist *list; |
124 GaimRoomlistRoom *room; | 142 GaimRoomlistRoom *room; |
125 }; | 143 }; |
126 | 144 |
145 static void | |
146 selection_changed_cb(GtkTreeSelection *selection, GaimGtkRoomlist *grl) { | |
147 GtkTreeIter iter; | |
148 GValue val = { 0, }; | |
149 GaimRoomlistRoom *room; | |
150 static struct _menu_cb_info *info; | |
151 GaimGtkRoomlistDialog *dialog; | |
152 | |
153 dialog = grl->dialog; | |
154 | |
155 if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { | |
156 gtk_tree_model_get_value(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &val); | |
157 room = g_value_get_pointer(&val); | |
158 if (!room || !(room->type & GAIM_ROOMLIST_ROOMTYPE_ROOM)) { | |
159 gtk_widget_set_sensitive(dialog->join_button, FALSE); | |
160 return; | |
161 } | |
162 | |
163 info = g_new0(struct _menu_cb_info, 1); | |
164 info->list = dialog->roomlist; | |
165 info->room = room; | |
166 | |
167 g_object_set_data(G_OBJECT(dialog->join_button), "room-info", info); | |
168 | |
169 gtk_widget_set_sensitive(dialog->join_button, TRUE); | |
170 } else { | |
171 gtk_widget_set_sensitive(dialog->join_button, FALSE); | |
172 } | |
173 } | |
174 | |
127 static void do_join_cb(GtkWidget *w, struct _menu_cb_info *info) | 175 static void do_join_cb(GtkWidget *w, struct _menu_cb_info *info) |
128 { | 176 { |
129 GHashTable *components; | 177 gaim_roomlist_room_join(info->list, info->room); |
130 GList *l, *j; | 178 } |
131 GaimConnection *gc; | 179 |
132 | 180 static void join_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) |
133 gc = gaim_account_get_connection(info->list->account); | 181 { |
134 if (!gc) | 182 GaimRoomlist *rl = dialog->roomlist; |
135 return; | 183 GaimGtkRoomlist *grl = rl->ui_data; |
136 | 184 struct _menu_cb_info *info; |
137 components = g_hash_table_new(g_str_hash, g_str_equal); | 185 |
138 | 186 info = (struct _menu_cb_info*)g_object_get_data(G_OBJECT(button), "room-info"); |
139 g_hash_table_replace(components, g_strdup("name"), g_strdup(info->room->name)); | 187 |
140 for (l = info->list->fields, j = info->room->fields; l && j; l = l->next, j = j->next) { | 188 do_join_cb(grl->tree, info); |
141 GaimRoomlistField *f = l->data; | 189 g_free(info); |
142 | |
143 g_hash_table_replace(components, f->name, j->data); | |
144 } | |
145 | |
146 serv_join_chat(gc, components); | |
147 | |
148 g_hash_table_destroy(components); | |
149 } | 190 } |
150 | 191 |
151 static void row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *arg2, | 192 static void row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *arg2, |
152 GaimRoomlist *list) | 193 GaimRoomlist *list) |
153 { | 194 { |
235 | 276 |
236 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account) | 277 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account) |
237 { | 278 { |
238 GaimGtkRoomlistDialog *dialog; | 279 GaimGtkRoomlistDialog *dialog; |
239 GtkWidget *window; | 280 GtkWidget *window; |
240 GtkWidget *vbox1, *vbox2; | 281 GtkWidget *vbox; |
282 GtkWidget *vbox2; | |
241 GtkWidget *account_hbox; | 283 GtkWidget *account_hbox; |
242 GtkWidget *bbox; | 284 GtkWidget *bbox; |
243 GtkWidget *label; | 285 GtkWidget *label; |
244 GtkWidget *button; | |
245 GaimAccount *first_account = NULL; | 286 GaimAccount *first_account = NULL; |
246 | 287 |
247 if (!account) { | 288 if (!account) { |
248 GList *c; | 289 GList *c; |
249 GaimConnection *gc; | 290 GaimConnection *gc; |
279 | 320 |
280 g_signal_connect(G_OBJECT(window), "delete_event", | 321 g_signal_connect(G_OBJECT(window), "delete_event", |
281 G_CALLBACK(delete_win_cb), dialog); | 322 G_CALLBACK(delete_win_cb), dialog); |
282 | 323 |
283 /* Create the parent vbox for everything. */ | 324 /* Create the parent vbox for everything. */ |
284 vbox1 = gtk_vbox_new(FALSE, 12); | 325 vbox = gtk_vbox_new(FALSE, 12); |
285 gtk_container_add(GTK_CONTAINER(window), vbox1); | 326 gtk_container_add(GTK_CONTAINER(window), vbox); |
286 gtk_widget_show(vbox1); | 327 gtk_widget_show(vbox); |
287 | 328 |
288 /* Create the main vbox for top half of the window. */ | 329 vbox2 = gtk_vbox_new(FALSE, 12); |
289 vbox2 = gtk_vbox_new(FALSE, 6); | 330 gtk_container_add(GTK_CONTAINER(vbox), vbox2); |
290 gtk_box_pack_start(GTK_BOX(vbox1), vbox2, FALSE, FALSE, 0); | |
291 gtk_widget_show(vbox2); | 331 gtk_widget_show(vbox2); |
292 | |
293 account_hbox = gtk_hbox_new(FALSE, 0); | |
294 gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, TRUE, TRUE, 0); | |
295 gtk_widget_show(account_hbox); | |
296 | 332 |
297 /* accounts dropdown list */ | 333 /* accounts dropdown list */ |
298 if (!account) { | 334 if (!account) { |
335 account_hbox = gtk_hbox_new(FALSE, 0); | |
336 gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0); | |
337 gtk_widget_show(account_hbox); | |
338 | |
299 dialog->account = first_account; | 339 dialog->account = first_account; |
300 label = gtk_label_new(NULL); | 340 label = gtk_label_new(NULL); |
301 gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); | 341 gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); |
302 gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); | 342 gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); |
303 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 343 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
304 | 344 gtk_widget_show(label); |
305 | 345 |
306 dialog->account_widget = gaim_gtk_account_option_menu_new(first_account, FALSE, | 346 dialog->account_widget = gaim_gtk_account_option_menu_new(first_account, FALSE, |
307 G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); | 347 G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); |
308 | 348 |
309 gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0); | 349 gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0); |
310 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget)); | 350 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget)); |
311 gtk_widget_show(label); | |
312 gtk_widget_show(dialog->account_widget); | 351 gtk_widget_show(dialog->account_widget); |
352 | |
313 } else { | 353 } else { |
314 dialog->account = account; | 354 dialog->account = account; |
315 } | 355 } |
316 | 356 |
317 | 357 /* scrolled window */ |
318 /* Now the button box for the buttons */ | |
319 bbox = gtk_hbutton_box_new(); | |
320 gtk_box_set_spacing(GTK_BOX(bbox), 6); | |
321 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_EDGE); | |
322 gtk_box_pack_start(GTK_BOX(vbox2), bbox, FALSE, TRUE, 0); | |
323 gtk_widget_show(bbox); | |
324 | |
325 /* Get list button */ | |
326 button = gtk_button_new_with_mnemonic(_("Get _List")); | |
327 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
328 gtk_widget_show(button); | |
329 dialog->list_button = button; | |
330 | |
331 g_signal_connect(G_OBJECT(button), "clicked", | |
332 G_CALLBACK(list_button_cb), dialog); | |
333 /* Stop button */ | |
334 button = gtk_button_new_from_stock(GTK_STOCK_STOP); | |
335 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
336 gtk_widget_show(button); | |
337 gtk_widget_set_sensitive(button, FALSE); | |
338 dialog->stop_button = button; | |
339 | |
340 g_signal_connect(G_OBJECT(button), "clicked", | |
341 G_CALLBACK(stop_button_cb), dialog); | |
342 /* Close button */ | |
343 button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
344 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | |
345 gtk_widget_show(button); | |
346 dialog->close_button = button; | |
347 | |
348 g_signal_connect(G_OBJECT(button), "clicked", | |
349 G_CALLBACK(close_button_cb), dialog); | |
350 | |
351 /* The pusling dilly */ | |
352 dialog->progress = gtk_progress_bar_new(); | |
353 gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(dialog->progress), 0.1); | |
354 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(dialog->progress), | |
355 " "); | |
356 gtk_box_pack_start(GTK_BOX(vbox2), dialog->progress, TRUE, TRUE, 0); | |
357 gtk_widget_show(dialog->progress); | |
358 | |
359 | |
360 gtk_widget_show(dialog->window); | |
361 | |
362 dialog->sw = gtk_scrolled_window_new(NULL, NULL); | 358 dialog->sw = gtk_scrolled_window_new(NULL, NULL); |
363 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(dialog->sw), | 359 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(dialog->sw), |
364 GTK_SHADOW_IN); | 360 GTK_SHADOW_IN); |
365 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(dialog->sw), | 361 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(dialog->sw), |
366 GTK_POLICY_AUTOMATIC, | 362 GTK_POLICY_AUTOMATIC, |
367 GTK_POLICY_AUTOMATIC); | 363 GTK_POLICY_AUTOMATIC); |
368 gtk_box_pack_start(GTK_BOX(vbox1), dialog->sw, TRUE, TRUE, 0); | 364 gtk_box_pack_start(GTK_BOX(vbox2), dialog->sw, TRUE, TRUE, 0); |
365 gtk_widget_set_size_request(dialog->sw, -1, 250); | |
369 gtk_widget_show(dialog->sw); | 366 gtk_widget_show(dialog->sw); |
367 | |
368 /* progress bar */ | |
369 dialog->progress = gtk_progress_bar_new(); | |
370 gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(dialog->progress), 0.1); | |
371 gtk_box_pack_start(GTK_BOX(vbox2), dialog->progress, FALSE, FALSE, 0); | |
372 gtk_widget_show(dialog->progress); | |
373 | |
374 | |
375 /* button box */ | |
376 bbox = gtk_hbutton_box_new(); | |
377 gtk_box_set_spacing(GTK_BOX(bbox), 6); | |
378 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); | |
379 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, TRUE, 0); | |
380 gtk_widget_show(bbox); | |
381 | |
382 /* stop button */ | |
383 dialog->stop_button = gtk_button_new_from_stock(GTK_STOCK_STOP); | |
384 gtk_box_pack_start(GTK_BOX(bbox), dialog->stop_button, FALSE, FALSE, 0); | |
385 g_signal_connect(G_OBJECT(dialog->stop_button), "clicked", | |
386 G_CALLBACK(stop_button_cb), dialog); | |
387 gtk_widget_set_sensitive(dialog->stop_button, FALSE); | |
388 gtk_widget_show(dialog->stop_button); | |
389 | |
390 /* list button */ | |
391 dialog->list_button = gtk_button_new_with_mnemonic(_("_Get List")); | |
392 gtk_box_pack_start(GTK_BOX(bbox), dialog->list_button, FALSE, FALSE, 0); | |
393 g_signal_connect(G_OBJECT(dialog->list_button), "clicked", | |
394 G_CALLBACK(list_button_cb), dialog); | |
395 gtk_widget_show(dialog->list_button); | |
396 | |
397 /* join button */ | |
398 dialog->join_button = gaim_pixbuf_button_from_stock(_("_Join"), GAIM_STOCK_CHAT, | |
399 GAIM_BUTTON_HORIZONTAL); | |
400 gtk_box_pack_start(GTK_BOX(bbox), dialog->join_button, FALSE, FALSE, 0); | |
401 g_signal_connect(G_OBJECT(dialog->join_button), "clicked", | |
402 G_CALLBACK(join_button_cb), dialog); | |
403 gtk_widget_set_sensitive(dialog->join_button, FALSE); | |
404 gtk_widget_show(dialog->join_button); | |
405 | |
406 /* close button */ | |
407 dialog->close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | |
408 gtk_box_pack_start(GTK_BOX(bbox), dialog->close_button, FALSE, FALSE, 0); | |
409 g_signal_connect(G_OBJECT(dialog->close_button), "clicked", | |
410 G_CALLBACK(close_button_cb), dialog); | |
411 gtk_widget_show(dialog->close_button); | |
412 | |
413 /* show the dialog window and return the dialog */ | |
414 gtk_widget_show(dialog->window); | |
370 | 415 |
371 return dialog; | 416 return dialog; |
372 } | 417 } |
373 | 418 |
374 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void) | 419 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void) |
436 int j; | 481 int j; |
437 GtkTreeStore *model; | 482 GtkTreeStore *model; |
438 GtkWidget *tree; | 483 GtkWidget *tree; |
439 GtkCellRenderer *renderer; | 484 GtkCellRenderer *renderer; |
440 GtkTreeViewColumn *column; | 485 GtkTreeViewColumn *column; |
486 GtkTreeSelection *selection; | |
441 GList *l; | 487 GList *l; |
442 GType *types; | 488 GType *types; |
443 | 489 |
444 g_return_if_fail(grl != NULL); | 490 g_return_if_fail(grl != NULL); |
445 | 491 |
469 g_free(types); | 515 g_free(types); |
470 | 516 |
471 tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); | 517 tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); |
472 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree), TRUE); | 518 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(tree), TRUE); |
473 | 519 |
520 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); | |
521 g_signal_connect(G_OBJECT(selection), "changed", | |
522 G_CALLBACK(selection_changed_cb), grl); | |
523 | |
474 g_object_unref(model); | 524 g_object_unref(model); |
475 | 525 |
476 grl->model = model; | 526 grl->model = model; |
477 grl->tree = tree; | 527 grl->tree = tree; |
478 gtk_widget_show(grl->tree); | 528 gtk_widget_show(grl->tree); |
511 } | 561 } |
512 | 562 |
513 g_signal_connect(G_OBJECT(tree), "button-press-event", G_CALLBACK(room_click_cb), list); | 563 g_signal_connect(G_OBJECT(tree), "button-press-event", G_CALLBACK(room_click_cb), list); |
514 g_signal_connect(G_OBJECT(tree), "row-expanded", G_CALLBACK(row_expanded_cb), list); | 564 g_signal_connect(G_OBJECT(tree), "row-expanded", G_CALLBACK(row_expanded_cb), list); |
515 g_signal_connect(G_OBJECT(tree), "row-activated", G_CALLBACK(row_activated_cb), list); | 565 g_signal_connect(G_OBJECT(tree), "row-activated", G_CALLBACK(row_activated_cb), list); |
516 /* gtk_container_add(GTK_CONTAINER(grl->sw), tree); */ | |
517 } | 566 } |
518 | 567 |
519 static void gaim_gtk_roomlist_add_room(GaimRoomlist *list, GaimRoomlistRoom *room) | 568 static void gaim_gtk_roomlist_add_room(GaimRoomlist *list, GaimRoomlistRoom *room) |
520 { | 569 { |
521 GaimGtkRoomlist *rl= list->ui_data; | 570 GaimGtkRoomlist *rl= list->ui_data; |
586 GaimGtkRoomlist *rl = list->ui_data; | 635 GaimGtkRoomlist *rl = list->ui_data; |
587 | 636 |
588 if (!rl || !rl->dialog) | 637 if (!rl || !rl->dialog) |
589 return; | 638 return; |
590 | 639 |
591 gtk_widget_set_sensitive(rl->dialog->stop_button, flag); | |
592 if (flag) { | 640 if (flag) { |
593 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(rl->dialog->progress), | 641 if (rl->dialog->account_widget) |
594 _("Downloading List...")); | 642 gtk_widget_set_sensitive(rl->dialog->account_widget, FALSE); |
643 gtk_widget_set_sensitive(rl->dialog->stop_button, TRUE); | |
644 gtk_widget_set_sensitive(rl->dialog->list_button, FALSE); | |
595 } else { | 645 } else { |
596 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(rl->dialog->progress), | |
597 " "); | |
598 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(rl->dialog->progress), 0.0); | 646 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(rl->dialog->progress), 0.0); |
647 if (rl->dialog->account_widget) | |
648 gtk_widget_set_sensitive(rl->dialog->account_widget, TRUE); | |
649 gtk_widget_set_sensitive(rl->dialog->stop_button, FALSE); | |
650 gtk_widget_set_sensitive(rl->dialog->list_button, TRUE); | |
599 } | 651 } |
600 } | 652 } |
601 | 653 |
602 static void gaim_gtk_roomlist_destroy(GaimRoomlist *list) | 654 static void gaim_gtk_roomlist_destroy(GaimRoomlist *list) |
603 { | 655 { |