Mercurial > pidgin
changeset 28572:b26b9f8c9dbd
merge of '23b195ee466a16623c26be2604cba4a8c5b889b2'
and '79d3923b372c2c78a19e2fd702df542bd391a1ea'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 16 Nov 2009 07:19:27 +0000 |
parents | 8f62997d90b7 (current diff) ec5316033618 (diff) |
children | 7e7023193316 |
files | pidgin/gtkprefs.c |
diffstat | 1 files changed, 45 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkprefs.c Mon Nov 16 07:08:27 2009 +0000 +++ b/pidgin/gtkprefs.c Mon Nov 16 07:19:27 2009 +0000 @@ -1049,6 +1049,8 @@ ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); + vbox = pidgin_make_frame(ret, _("Theme Selections")); + /* Instructions */ label = gtk_label_new(_("Select a theme that you would like to use from " "the lists below. New themes can be installed by " @@ -1065,6 +1067,7 @@ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); label = gtk_label_new(_("Buddy List Theme:")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_size_group_add_widget(label_sg, label); gtk_box_pack_start(GTK_BOX(themesel_hbox), label, FALSE, FALSE, 0); @@ -1076,12 +1079,13 @@ gtk_size_group_add_widget(combo_sg, prefs_blist_themes_combo_box); gtk_box_pack_start(GTK_BOX(themesel_hbox), prefs_blist_themes_combo_box, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ret), themesel_hbox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), themesel_hbox, FALSE, FALSE, 0); /* Status Icon Themes */ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); label = gtk_label_new(_("Status Icon Theme:")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_size_group_add_widget(label_sg, label); gtk_box_pack_start(GTK_BOX(themesel_hbox), label, FALSE, FALSE, 0); @@ -1093,12 +1097,13 @@ gtk_size_group_add_widget(combo_sg, prefs_status_themes_combo_box); gtk_box_pack_start(GTK_BOX(themesel_hbox), prefs_status_themes_combo_box, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ret), themesel_hbox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), themesel_hbox, FALSE, FALSE, 0); /* Sound Themes */ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); label = gtk_label_new(_("Sound Theme:")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_size_group_add_widget(label_sg, label); gtk_box_pack_start(GTK_BOX(themesel_hbox), label, FALSE, FALSE, 0); @@ -1110,7 +1115,7 @@ gtk_size_group_add_widget(combo_sg, prefs_sound_themes_combo_box); gtk_box_pack_start(GTK_BOX(themesel_hbox), prefs_sound_themes_combo_box, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(ret), themesel_hbox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), themesel_hbox, FALSE, FALSE, 0); /* Smiley Themes */ themesel_hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); @@ -1852,8 +1857,7 @@ static GtkWidget * browser_page(void) { - GtkWidget *ret, *vbox, *hbox, *label, *entry; - GtkWidget *browser_warning, *browser_button; + GtkWidget *ret, *vbox, *hbox, *label, *entry, *browser_button; GtkSizeGroup *sg; GList *browsers = NULL; @@ -1863,33 +1867,29 @@ vbox = pidgin_make_frame (ret, _("Browser Selection")); if(purple_running_gnome()) { - browser_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gchar *path = g_find_program_in_path("gnome-default-applications-properties"); + + hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + label = gtk_label_new(_("Browser preferences are configured in GNOME preferences")); gtk_container_add(GTK_CONTAINER(vbox), hbox); - - label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(label), - _("<b>Browser configuration program was not found.</b>")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); gtk_container_add(GTK_CONTAINER(vbox), hbox); - gtk_widget_show(hbox); - - label = gtk_label_new(_("Browser preferences are configured in GNOME preferences")); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - gtk_widget_show(label); - - hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - browser_button = gtk_button_new_with_mnemonic(_("Configure _Browser")); - g_signal_connect(G_OBJECT(browser_button), "clicked", - G_CALLBACK(browser_button_clicked_cb), NULL); - gtk_box_pack_start(GTK_BOX(hbox), browser_button, FALSE, FALSE, 0); - gtk_widget_show(browser_button); - gtk_widget_show(hbox); - - gtk_widget_show(vbox); - gtk_widget_show(ret); + + if(path == NULL) { + label = gtk_label_new(NULL); + gtk_label_set_markup(GTK_LABEL(label), + _("<b>Browser configuration program was not found.</b>")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + } else { + browser_button = gtk_button_new_with_mnemonic(_("Configure _Browser")); + g_signal_connect(G_OBJECT(browser_button), "clicked", + G_CALLBACK(browser_button_clicked_cb), NULL); + gtk_box_pack_start(GTK_BOX(hbox), browser_button, FALSE, FALSE, 0); + } + + gtk_widget_show_all(ret); } else { sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -1943,8 +1943,7 @@ proxy_page(void) { GtkWidget *ret = NULL, *vbox = NULL, *hbox = NULL; - GtkWidget *table = NULL, *entry = NULL, *label = NULL; - GtkWidget *proxy_warning = NULL, *proxy_button = NULL; + GtkWidget *table = NULL, *entry = NULL, *label = NULL, *proxy_button = NULL; PurpleProxyInfo *proxy_info; ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); @@ -1953,33 +1952,29 @@ prefs_proxy_frame = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); if(purple_running_gnome()) { - proxy_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + gchar *path = g_find_program_in_path("gnome-network-preferences"); + + hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); + label = gtk_label_new(_("Proxy preferences are configured in GNOME preferences")); gtk_container_add(GTK_CONTAINER(vbox), hbox); - - label = gtk_label_new(NULL); - gtk_label_set_markup(GTK_LABEL(label), - _("<b>Proxy configuration program was not found.</b>")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); gtk_container_add(GTK_CONTAINER(vbox), hbox); - label = gtk_label_new(_("Proxy preferences are configured in GNOME preferences")); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - gtk_widget_show(label); - gtk_widget_show(hbox); - - hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); - gtk_container_add(GTK_CONTAINER(vbox), hbox); - proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy")); - g_signal_connect(G_OBJECT(proxy_button), "clicked", - G_CALLBACK(proxy_button_clicked_cb), NULL); - gtk_box_pack_start(GTK_BOX(hbox), proxy_button, FALSE, FALSE, 0); - gtk_widget_show(proxy_button); - gtk_widget_show(hbox); - - gtk_widget_show(vbox); - gtk_widget_show(ret); + if(path == NULL) { + label = gtk_label_new(NULL); + gtk_label_set_markup(GTK_LABEL(label), + _("<b>Proxy configuration program was not found.</b>")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + } else { + proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy")); + g_signal_connect(G_OBJECT(proxy_button), "clicked", + G_CALLBACK(proxy_button_clicked_cb), NULL); + gtk_box_pack_start(GTK_BOX(hbox), proxy_button, FALSE, FALSE, 0); + } + + gtk_widget_show_all(ret); } else { prefs_proxy_subframe = gtk_vbox_new(FALSE, 0);