Mercurial > pidgin
comparison src/gtkroomlist.c @ 8352:77baefe979c6
[gaim-migrate @ 9076]
this compiles, and I don't think it breaks anything, so here's
/list support, again from our patient friend marv
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 27 Feb 2004 01:48:11 +0000 |
parents | ef881489396e |
children | c1ca19c8f749 |
comparison
equal
deleted
inserted
replaced
8351:ffa642240fc1 | 8352:77baefe979c6 |
---|---|
341 | 341 |
342 vbox2 = gtk_vbox_new(FALSE, 12); | 342 vbox2 = gtk_vbox_new(FALSE, 12); |
343 gtk_container_add(GTK_CONTAINER(vbox), vbox2); | 343 gtk_container_add(GTK_CONTAINER(vbox), vbox2); |
344 gtk_widget_show(vbox2); | 344 gtk_widget_show(vbox2); |
345 | 345 |
346 | |
347 if (!account) | |
348 dialog->account = first_account; | |
349 else | |
350 dialog->account = account; | |
346 /* accounts dropdown list */ | 351 /* accounts dropdown list */ |
347 if (!account) { | 352 account_hbox = gtk_hbox_new(FALSE, 0); |
348 account_hbox = gtk_hbox_new(FALSE, 0); | 353 gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0); |
349 gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0); | 354 gtk_widget_show(account_hbox); |
350 gtk_widget_show(account_hbox); | 355 |
351 | 356 label = gtk_label_new(NULL); |
352 dialog->account = first_account; | 357 gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); |
353 label = gtk_label_new(NULL); | 358 gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); |
354 gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); | 359 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
355 gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); | 360 gtk_widget_show(label); |
356 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 361 |
357 gtk_widget_show(label); | 362 dialog->account_widget = gaim_gtk_account_option_menu_new(dialog->account, FALSE, |
358 | 363 G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); |
359 dialog->account_widget = gaim_gtk_account_option_menu_new(first_account, FALSE, | 364 |
360 G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); | 365 gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0); |
361 | 366 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget)); |
362 gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0); | 367 gtk_widget_show(dialog->account_widget); |
363 gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget)); | |
364 gtk_widget_show(dialog->account_widget); | |
365 | |
366 } else { | |
367 dialog->account = account; | |
368 } | |
369 | 368 |
370 /* scrolled window */ | 369 /* scrolled window */ |
371 dialog->sw = gtk_scrolled_window_new(NULL, NULL); | 370 dialog->sw = gtk_scrolled_window_new(NULL, NULL); |
372 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(dialog->sw), | 371 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(dialog->sw), |
373 GTK_SHADOW_IN); | 372 GTK_SHADOW_IN); |
430 } | 429 } |
431 | 430 |
432 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void) | 431 GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void) |
433 { | 432 { |
434 return gaim_gtk_roomlist_dialog_new_with_account(NULL); | 433 return gaim_gtk_roomlist_dialog_new_with_account(NULL); |
434 } | |
435 | |
436 static void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account) | |
437 { | |
438 GaimGtkRoomlistDialog *dialog; | |
439 | |
440 dialog = gaim_gtk_roomlist_dialog_new_with_account(account); | |
441 if (!dialog) | |
442 return; | |
443 | |
444 list_button_cb(GTK_BUTTON(dialog->list_button), dialog); | |
435 } | 445 } |
436 | 446 |
437 void gaim_gtk_roomlist_dialog_show(void) | 447 void gaim_gtk_roomlist_dialog_show(void) |
438 { | 448 { |
439 gaim_gtk_roomlist_dialog_new(); | 449 gaim_gtk_roomlist_dialog_new(); |
699 g_free(rl); | 709 g_free(rl); |
700 list->ui_data = NULL; | 710 list->ui_data = NULL; |
701 } | 711 } |
702 | 712 |
703 static GaimRoomlistUiOps ops = { | 713 static GaimRoomlistUiOps ops = { |
714 gaim_gtk_roomlist_dialog_show_with_account, | |
704 gaim_gtk_roomlist_new, | 715 gaim_gtk_roomlist_new, |
705 gaim_gtk_roomlist_set_fields, | 716 gaim_gtk_roomlist_set_fields, |
706 gaim_gtk_roomlist_add_room, | 717 gaim_gtk_roomlist_add_room, |
707 gaim_gtk_roomlist_in_progress, | 718 gaim_gtk_roomlist_in_progress, |
708 gaim_gtk_roomlist_destroy | 719 gaim_gtk_roomlist_destroy |