Mercurial > pidgin.yaz
comparison src/prefs.c @ 1370:776bb4c6c0b8
[gaim-migrate @ 1380]
woohoo. no more HTML codes in protocols that don't support them.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 04 Jan 2001 21:59:35 +0000 |
parents | 155db3303ebb |
children | 1bbdebd66afd |
comparison
equal
deleted
inserted
replaced
1369:0b4278a90323 | 1370:776bb4c6c0b8 |
---|---|
1114 } | 1114 } |
1115 | 1115 |
1116 static struct away_message *cur_message; | 1116 static struct away_message *cur_message; |
1117 static char *edited_message; | 1117 static char *edited_message; |
1118 static GtkWidget *away_text; | 1118 static GtkWidget *away_text; |
1119 static GtkWidget *make_away_button = NULL;; | |
1119 | 1120 |
1120 void away_list_clicked(GtkWidget *widget, struct away_message *a) | 1121 void away_list_clicked(GtkWidget *widget, struct away_message *a) |
1121 { | 1122 { |
1122 gchar buffer[2048]; | 1123 gchar buffer[2048]; |
1123 guint text_len; | 1124 guint text_len; |
1164 | 1165 |
1165 static void paldest(GtkWidget *m, gpointer n) | 1166 static void paldest(GtkWidget *m, gpointer n) |
1166 { | 1167 { |
1167 gtk_widget_destroy(prefs_away_list); | 1168 gtk_widget_destroy(prefs_away_list); |
1168 prefs_away_list = NULL; | 1169 prefs_away_list = NULL; |
1170 make_away_button = NULL; | |
1169 } | 1171 } |
1170 | 1172 |
1171 static void do_away_mess(GtkWidget *m, gpointer n) | 1173 static void do_away_mess(GtkWidget *m, gpointer n) |
1172 { | 1174 { |
1173 GList *i = GTK_LIST(prefs_away_list)->selection; | 1175 GList *i = GTK_LIST(prefs_away_list)->selection; |
1300 | 1302 |
1301 button = picture_button(prefs, _("Edit"), save_xpm); | 1303 button = picture_button(prefs, _("Edit"), save_xpm); |
1302 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); | 1304 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); |
1303 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); | 1305 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
1304 | 1306 |
1305 button = picture_button(prefs, _("Make Away"), gnome_preferences_xpm); | 1307 make_away_button = picture_button(prefs, _("Make Away"), gnome_preferences_xpm); |
1306 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_away_mess), NULL); | 1308 gtk_signal_connect(GTK_OBJECT(make_away_button), "clicked", GTK_SIGNAL_FUNC(do_away_mess), NULL); |
1307 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); | 1309 gtk_box_pack_start(GTK_BOX(bot), make_away_button, TRUE, FALSE, 5); |
1310 if (!connections) | |
1311 gtk_widget_set_sensitive(make_away_button, FALSE); | |
1308 | 1312 |
1309 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); | 1313 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); |
1310 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL); | 1314 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL); |
1311 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); | 1315 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
1312 | 1316 |
1447 GtkWidget *label; | 1451 GtkWidget *label; |
1448 GtkWidget *opt; | 1452 GtkWidget *opt; |
1449 | 1453 |
1450 parent = prefdialog->parent; | 1454 parent = prefdialog->parent; |
1451 gtk_widget_destroy(prefdialog); | 1455 gtk_widget_destroy(prefdialog); |
1452 prefs_away_list = NULL; | |
1453 | 1456 |
1454 prefdialog = gtk_frame_new(_("Browser Options")); | 1457 prefdialog = gtk_frame_new(_("Browser Options")); |
1455 gtk_container_add(GTK_CONTAINER(parent), prefdialog); | 1458 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
1456 | 1459 |
1457 box = gtk_vbox_new(FALSE, 5); | 1460 box = gtk_vbox_new(FALSE, 5); |
1799 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); | 1802 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5); |
1800 | 1803 |
1801 gtk_widget_show(prefdialog); | 1804 gtk_widget_show(prefdialog); |
1802 } | 1805 } |
1803 | 1806 |
1804 void update_connection_dependent_prefs() | 1807 void update_connection_dependent_prefs() /* what a crappy name */ |
1805 { /* what a crappy name */ | 1808 { |
1806 gboolean needdeny = FALSE; | 1809 gboolean needdeny = FALSE; |
1807 GSList *c = connections; | 1810 GSList *c = connections; |
1808 struct gaim_connection *gc = NULL; | 1811 struct gaim_connection *gc = NULL; |
1809 | 1812 |
1810 if (!prefs) | 1813 if (!prefs) |
1828 build_deny_menu(); | 1831 build_deny_menu(); |
1829 build_allow_list(); | 1832 build_allow_list(); |
1830 build_block_list(); | 1833 build_block_list(); |
1831 } else if (needdeny && !deny_node) { | 1834 } else if (needdeny && !deny_node) { |
1832 prefs_build_deny(); | 1835 prefs_build_deny(); |
1836 } | |
1837 | |
1838 if (make_away_button) { | |
1839 if (connections) | |
1840 gtk_widget_set_sensitive(make_away_button, TRUE); | |
1841 else | |
1842 gtk_widget_set_sensitive(make_away_button, FALSE); | |
1833 } | 1843 } |
1834 } | 1844 } |
1835 | 1845 |
1836 static void try_me(GtkCTree * ctree, GtkCTreeNode * node) | 1846 static void try_me(GtkCTree * ctree, GtkCTreeNode * node) |
1837 { | 1847 { |