comparison src/prefs.c @ 4026:a997156437b6

[gaim-migrate @ 4230] Win prefs page w/ transparency option added committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Sun, 01 Dec 2002 03:08:27 +0000
parents 2b18ea0ade13
children a3ec0146c73e
comparison
equal deleted inserted replaced
4025:0d8b71d0d8f8 4026:a997156437b6
37 #include "gtkimhtml.h" 37 #include "gtkimhtml.h"
38 #include "gaim.h" 38 #include "gaim.h"
39 #include "prpl.h" 39 #include "prpl.h"
40 #include "proxy.h" 40 #include "proxy.h"
41 41
42 #ifdef _WIN32
43 #include "win32dep.h"
44 #endif
45
42 char fontface[128]; 46 char fontface[128];
43 47
44 GtkWidget *tree_v = NULL; 48 GtkWidget *tree_v = NULL;
45 GtkWidget *prefs_away_list = NULL; 49 GtkWidget *prefs_away_list = NULL;
46 GtkWidget *prefs_away_menu = NULL; 50 GtkWidget *prefs_away_menu = NULL;
57 static GtkWidget *sound_entry = NULL; 61 static GtkWidget *sound_entry = NULL;
58 static GtkWidget *away_text = NULL; 62 static GtkWidget *away_text = NULL;
59 GtkCTreeNode *general_node = NULL; 63 GtkCTreeNode *general_node = NULL;
60 GtkCTreeNode *deny_node = NULL; 64 GtkCTreeNode *deny_node = NULL;
61 GtkWidget *prefs_proxy_frame = NULL; 65 GtkWidget *prefs_proxy_frame = NULL;
62 static GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *); 66 GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *);
63 GtkWidget *gaim_labeled_spin_button(GtkWidget *, const gchar *, int*, int, int, GtkSizeGroup *); 67 GtkWidget *gaim_labeled_spin_button(GtkWidget *, const gchar *, int*, int, int, GtkSizeGroup *);
64 static GtkWidget *gaim_dropdown(GtkWidget *, const gchar *, int *, int, ...); 68 static GtkWidget *gaim_dropdown(GtkWidget *, const gchar *, int *, int, ...);
65 static GtkWidget *show_color_pref(GtkWidget *, gboolean); 69 static GtkWidget *show_color_pref(GtkWidget *, gboolean);
66 static void delete_prefs(GtkWidget *, void *); 70 static void delete_prefs(GtkWidget *, void *);
67 void set_default_away(GtkWidget *, gpointer); 71 void set_default_away(GtkWidget *, gpointer);
1392 prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, notebook_page++); 1396 prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, notebook_page++);
1393 prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, notebook_page++); 1397 prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, notebook_page++);
1394 prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, notebook_page++); 1398 prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, notebook_page++);
1395 prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, notebook_page++); 1399 prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, notebook_page++);
1396 prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, notebook_page++); 1400 prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, notebook_page++);
1401 #ifdef _WIN32
1402 prefs_notebook_add_page(_("Windows Only"), NULL, wgaim_winprefs_page(), &p, NULL, notebook_page++);
1403 #endif
1397 #if USE_PLUGINS 1404 #if USE_PLUGINS
1398 prefs_notebook_add_page(_("Plugins"), NULL, plugin_page(), &plugin_iter, NULL, notebook_page++); 1405 prefs_notebook_add_page(_("Plugins"), NULL, plugin_page(), &plugin_iter, NULL, notebook_page++);
1399 while (l) { 1406 while (l) {
1400 plug = l->data; 1407 plug = l->data;
1401 if (plug->type == plugin && g_module_symbol(plug->handle, "gaim_plugin_config_gtk", (gpointer *)&config)) { 1408 if (plug->type == plugin && g_module_symbol(plug->handle, "gaim_plugin_config_gtk", (gpointer *)&config)) {
1739 toggle_away_queue(); 1746 toggle_away_queue();
1740 1747
1741 save_prefs(); 1748 save_prefs();
1742 } 1749 }
1743 1750
1751 #ifdef _WIN32
1752 static void set_wgaim_option(GtkWidget *w, int option)
1753 {
1754 wgaim_options ^= option;
1755 save_prefs();
1756 }
1757 #endif
1758
1744 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) 1759 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page)
1745 { 1760 {
1746 GtkWidget *button; 1761 GtkWidget *button;
1747 button = gtk_check_button_new_with_mnemonic(text); 1762 button = gtk_check_button_new_with_mnemonic(text);
1748 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); 1763 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option));
1749 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); 1764 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
1750 gtk_object_set_user_data(GTK_OBJECT(button), options); 1765 gtk_object_set_user_data(GTK_OBJECT(button), options);
1751 1766
1752 if (options == &misc_options) 1767 if (options == &misc_options)
1753 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), 1768 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option),
1754 (int *)option); 1769 (int *)option);
1755 if (options == &logging_options) 1770 if (options == &logging_options)
1756 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_logging_option), 1771 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_logging_option),
1757 (int *)option); 1772 (int *)option);
1771 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option), 1786 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option),
1772 (int *)option); 1787 (int *)option);
1773 if (options == &sound_options) 1788 if (options == &sound_options)
1774 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option), 1789 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option),
1775 (int *)option); 1790 (int *)option);
1776 if (options == &away_options) 1791 #ifdef _WIN32
1777 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_away_option), 1792 if (options == &wgaim_options)
1793 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_wgaim_option),
1778 (int *)option); 1794 (int *)option);
1779 1795 #endif
1780 gtk_widget_show(button); 1796 gtk_widget_show(button);
1781 1797
1782 return button; 1798 return button;
1783 } 1799 }
1784 1800