comparison src/prefs.c @ 3391:412d1035d666

[gaim-migrate @ 3410] Pluginzed the ticker. the ticker will load itself if the old ticker option was set. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 11 Aug 2002 06:42:17 +0000
parents dc29d0c4bdb5
children 1be15204741f
comparison
equal deleted inserted replaced
3390:a5d356cba156 3391:412d1035d666
148 static void set_im_options(); 148 static void set_im_options();
149 static void set_chat_options(); 149 static void set_chat_options();
150 static void set_font_options(); 150 static void set_font_options();
151 static void set_sound_options(); 151 static void set_sound_options();
152 static void set_away_options(); 152 static void set_away_options();
153
154 extern void BuddyTickerShow();
155 153
156 #define PROXYHOST 0 154 #define PROXYHOST 0
157 #define PROXYPORT 1 155 #define PROXYPORT 1
158 #define PROXYTYPE 2 156 #define PROXYTYPE 2
159 #define PROXYUSER 3 157 #define PROXYUSER 3
274 vbox = gtk_vbox_new(FALSE, 5); 272 vbox = gtk_vbox_new(FALSE, 5);
275 gtk_container_add (GTK_CONTAINER (frame), vbox); 273 gtk_container_add (GTK_CONTAINER (frame), vbox);
276 274
277 /* These shouldn't have to wait for user to click OK or APPLY or whatnot */ 275 /* These shouldn't have to wait for user to click OK or APPLY or whatnot */
278 /* They really shouldn't be in preferences at all */ 276 /* They really shouldn't be in preferences at all */
279 gaim_button(_("Show Buddy Ticker"), &misc_options, OPT_MISC_BUDDY_TICKER, vbox);
280 debugbutton = gaim_button(_("Show Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox); 277 debugbutton = gaim_button(_("Show Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox);
281 gtk_widget_show (vbox); 278 gtk_widget_show (vbox);
282 279
283 280
284 frame = gtk_frame_new (_("Style")); 281 frame = gtk_frame_new (_("Style"));
1965 misc_options ^= option; 1962 misc_options ^= option;
1966 1963
1967 if (option == OPT_MISC_DEBUG) 1964 if (option == OPT_MISC_DEBUG)
1968 show_debug(); 1965 show_debug();
1969 1966
1970 if (option == OPT_MISC_BUDDY_TICKER)
1971 BuddyTickerShow();
1972
1973 save_prefs(); 1967 save_prefs();
1974 } 1968 }
1975 1969
1976 1970
1977 /* Functions for each _options variable that sees what's changed, and makes 1971 /* Functions for each _options variable that sees what's changed, and makes
2117 button = gtk_check_button_new_with_label(text); 2111 button = gtk_check_button_new_with_label(text);
2118 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); 2112 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option));
2119 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); 2113 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
2120 gtk_object_set_user_data(GTK_OBJECT(button), options); 2114 gtk_object_set_user_data(GTK_OBJECT(button), options);
2121 2115
2122 /* So that the ticker and debug window happen immediately 2116 /* So that the debug window happens immediately
2123 * I don't think they should be "preferences," anyway. */ 2117 * I don't think it should be "preferences," anyway. */
2124 if (options == &misc_options && (option == OPT_MISC_DEBUG || option == OPT_MISC_BUDDY_TICKER)) 2118 if (options == &misc_options && option == OPT_MISC_DEBUG)
2125 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), 2119 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option),
2126 (int *)option); 2120 (int *)option);
2127 else 2121 else
2128 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_option), 2122 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_option),
2129 (int *)option); 2123 (int *)option);