Mercurial > pidgin.yaz
changeset 3032:d3536105d581
[gaim-migrate @ 3045]
Thanks, Jason Willis.
I don't really like the tabs at the bottom, looks weird to me.
But hey, others seem to like it so that's cool with me.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 12 Mar 2002 02:44:22 +0000 |
parents | eafd12638829 |
children | 1143524a2eaf |
files | ChangeLog src/buddy.c src/gaim.h src/prefs.c |
diffstat | 4 files changed, 76 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 11 23:02:54 2002 +0000 +++ b/ChangeLog Tue Mar 12 02:44:22 2002 +0000 @@ -14,6 +14,7 @@ * Yahoo! can receive offline messages * IRC can do DCC chat. * IRC will convert HTML formatting to mIRC formatting. + * Buddylist tab placement option (Thanks Jason Willis) version 0.53 (02/28/2002): * Updated Polish Translation (thanks Przemyslaw Sulek)
--- a/src/buddy.c Mon Mar 11 23:02:54 2002 +0000 +++ b/src/buddy.c Tue Mar 12 02:44:22 2002 +0000 @@ -497,6 +497,19 @@ } } +void set_blist_tab() +{ + GtkWidget *blist_notebook; + + blist_notebook = buddypane->parent; /* The "Online" Page */ + + debug_printf("blist_options = %d\n", blist_options); + if((blist_options & OPT_BLIST_BOTTOM_TAB)) + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(blist_notebook), GTK_POS_BOTTOM); + else + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(blist_notebook), GTK_POS_TOP); + +} #ifdef USE_APPLET @@ -2657,6 +2670,9 @@ label = gtk_label_new(_("Edit Buddies")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), editpane, label); + if(blist_options & OPT_BLIST_BOTTOM_TAB) + gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM); + gtk_widget_show_all(notebook); /* Pack things in the vbox */
--- a/src/gaim.h Mon Mar 11 23:02:54 2002 +0000 +++ b/src/gaim.h Tue Mar 12 02:44:22 2002 +0000 @@ -207,6 +207,7 @@ #define OPT_BLIST_NO_MT_GRP 0x00000100 #define OPT_BLIST_SHOW_WARN 0x00000200 #define OPT_BLIST_GREY_IDLERS 0x00000400 +#define OPT_BLIST_BOTTOM_TAB 0X00000800 extern guint convo_options; #define OPT_CONVO_ENTER_SENDS 0x00000001
--- a/src/prefs.c Mon Mar 11 23:02:54 2002 +0000 +++ b/src/prefs.c Tue Mar 12 02:44:22 2002 +0000 @@ -50,6 +50,7 @@ static GtkWidget *prefs = NULL; static GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *); +static GtkWidget *blist_tab_radio(const char *, int, GtkWidget *, GtkWidget *); static void prefs_build_general(); static void prefs_build_buddy(); static void prefs_build_convo(); @@ -531,6 +532,8 @@ GtkWidget *frame; GtkWidget *hbox; GtkWidget *vbox; + GtkWidget *sep; + GtkWidget *opt; GtkWidget *button; GtkWidget *button2; @@ -553,11 +556,29 @@ gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); gtk_widget_show(frame); - hbox = gtk_hbox_new(TRUE, 5); + hbox = gtk_hbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_widget_show(hbox); - vbox = gtk_vbox_new(FALSE, 5); + /* "Place blist tabs */ + vbox = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); + gtk_widget_show(vbox); + + label = gtk_label_new(_("Tab Placement:")); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + opt = blist_tab_radio(_("Top"), ~(OPT_BLIST_BOTTOM_TAB), vbox, NULL); + opt = blist_tab_radio(_("Bottom"), OPT_BLIST_BOTTOM_TAB, vbox, opt); + + sep = gtk_vseparator_new(); + gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5); + gtk_widget_show(sep); + + /* End of blist tab options */ + + vbox = gtk_vbox_new(TRUE, 5); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); gtk_widget_show(vbox); @@ -568,19 +589,16 @@ #endif gaim_button(_("Save Window Size/Position"), &blist_options, OPT_BLIST_SAVED_WINDOWS, vbox); - vbox = gtk_vbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); - gtk_widget_show(vbox); - button2 = gaim_button(_("Show pictures on buttons"), &blist_options, OPT_BLIST_SHOW_BUTTON_XPM, vbox); if (blist_options & OPT_BLIST_NO_BUTTONS) gtk_widget_set_sensitive(button2, FALSE); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), button2); + #ifdef USE_APPLET gaim_button(_("Display Buddy List near applet"), &blist_options, OPT_BLIST_NEAR_APPLET, vbox); #endif - + frame = gtk_frame_new(_("Group Displays")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); gtk_widget_show(frame); @@ -2697,6 +2715,7 @@ if ((option == OPT_BLIST_GREY_IDLERS) || (option == OPT_BLIST_SHOW_IDLETIME)) update_idle_times(); + } static void set_convo_option(GtkWidget *w, int option) @@ -2824,6 +2843,38 @@ return button; } +static void blist_tab_opt(GtkWidget *widget, int option) +{ + /* Following general method of set_tab_opt() */ + int mask; + mask = (OPT_BLIST_BOTTOM_TAB); + + blist_options &= ~(mask); + blist_options |= (mask & option); + + set_blist_tab(); +} + +static GtkWidget *blist_tab_radio(const char *label, int which, GtkWidget *box,GtkWidget *set) +{ + GtkWidget *new_opt; + + if(!set) + new_opt = gtk_radio_button_new_with_label (NULL, label); + else + new_opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label); + + gtk_box_pack_start(GTK_BOX(box), new_opt, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(new_opt), "clicked", + GTK_SIGNAL_FUNC(blist_tab_opt), (void *)which); + gtk_widget_show(new_opt); + + if ((blist_options & OPT_BLIST_BOTTOM_TAB) == (which & OPT_BLIST_BOTTOM_TAB)) + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(new_opt), TRUE); + + return new_opt; +} + void prefs_build_general() { GtkCTreeNode *node;