comparison src/gtkprefs.c @ 11697:186d2d293ef4

[gaim-migrate @ 13988] Get rid of the "Idle Tracking Method" preference. Use mouse/keyboard movement when possible, otherwise fallback to Gaim-usage. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Oct 2005 03:48:22 +0000
parents 58bc500cf226
children a647f92e1d57
comparison
equal deleted inserted replaced
11696:8094a66d574b 11697:186d2d293ef4
1825 _("Never"), "never", 1825 _("Never"), "never",
1826 _("When away"), "away", 1826 _("When away"), "away",
1827 _("When both away and idle"), "awayidle", 1827 _("When both away and idle"), "awayidle",
1828 NULL); 1828 NULL);
1829 1829
1830 vbox = gaim_gtk_make_frame (ret, _("Idle"));
1831 dd = gaim_gtk_prefs_dropdown(vbox, _("Idle _Tracking:"),
1832 GAIM_PREF_STRING, "/gaim/gtk/idle/method",
1833 _("Gaim usage"), "gaim",
1834 #ifdef USE_SCREENSAVER
1835 #ifndef _WIN32
1836 _("X usage"), "system",
1837 #else
1838 _("Windows usage"), "system",
1839 #endif
1840 #endif
1841 NULL);
1842
1843 button = gaim_gtk_prefs_checkbox(_("_Report idle time"), 1830 button = gaim_gtk_prefs_checkbox(_("_Report idle time"),
1844 "/gaim/gtk/idle/report", vbox); 1831 "/gaim/gtk/idle/report", vbox);
1845 1832
1846 gtk_size_group_add_widget(sg, dd); 1833 gtk_size_group_add_widget(sg, dd);
1847 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); 1834 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5);
2309 gaim_prefs_add_string("/gaim/gtk/browsers/browser", "mozilla"); 2296 gaim_prefs_add_string("/gaim/gtk/browsers/browser", "mozilla");
2310 #endif 2297 #endif
2311 2298
2312 /* Idle */ 2299 /* Idle */
2313 gaim_prefs_add_none("/gaim/gtk/idle"); 2300 gaim_prefs_add_none("/gaim/gtk/idle");
2314 gaim_prefs_add_string("/gaim/gtk/idle/method",
2315 #ifdef USE_SCREENSAVER
2316 "system"
2317 #else
2318 "gaim"
2319 #endif
2320 );
2321 gaim_prefs_add_bool("/gaim/gtk/idle/report", TRUE); 2301 gaim_prefs_add_bool("/gaim/gtk/idle/report", TRUE);
2322 2302
2323 /* Plugins */ 2303 /* Plugins */
2324 gaim_prefs_add_none("/gaim/gtk/plugins"); 2304 gaim_prefs_add_none("/gaim/gtk/plugins");
2325 gaim_prefs_add_string_list("/gaim/gtk/plugins/loaded", NULL); 2305 gaim_prefs_add_string_list("/gaim/gtk/plugins/loaded", NULL);
2338 gaim_prefs_connect_callback(prefs, "/gaim/gtk/smileys/theme", 2318 gaim_prefs_connect_callback(prefs, "/gaim/gtk/smileys/theme",
2339 smiley_theme_pref_cb, NULL); 2319 smiley_theme_pref_cb, NULL);
2340 } 2320 }
2341 2321
2342 void gaim_gtk_prefs_update_old() { 2322 void gaim_gtk_prefs_update_old() {
2343 const char *idle_method;
2344 /* Rename some old prefs */ 2323 /* Rename some old prefs */
2345 gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims"); 2324 gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims");
2346 gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats"); 2325 gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats");
2347 gaim_prefs_rename("/core/conversations/placement", 2326 gaim_prefs_rename("/core/conversations/placement",
2348 "/gaim/gtk/conversations/placement"); 2327 "/gaim/gtk/conversations/placement");
2354 * The latter can be removed before 2.0.0 is released, or after that if it's forgotten. */ 2333 * The latter can be removed before 2.0.0 is released, or after that if it's forgotten. */
2355 gaim_prefs_rename_boolean_toggle("/gaim/gtk/conversations/ignore_colors", 2334 gaim_prefs_rename_boolean_toggle("/gaim/gtk/conversations/ignore_colors",
2356 "/gaim/gtk/conversations/show_incoming_formatting"); 2335 "/gaim/gtk/conversations/show_incoming_formatting");
2357 gaim_prefs_rename_boolean_toggle("/gaim/gtk/conversations/ignore_formatting", 2336 gaim_prefs_rename_boolean_toggle("/gaim/gtk/conversations/ignore_formatting",
2358 "/gaim/gtk/conversations/show_incoming_formatting"); 2337 "/gaim/gtk/conversations/show_incoming_formatting");
2359
2360 gaim_prefs_rename("/gaim/gtk/idle/reporting_method",
2361 "/gaim/gtk/idle/method");
2362 idle_method = gaim_prefs_get_string("/gaim/gtk/idle/method");
2363 if (idle_method == NULL || !strcmp("none", idle_method)) {
2364 gaim_prefs_set_string("/gaim/gtk/idle/method",
2365 #ifdef USE_SCREENSAVER
2366 "system"
2367 #else
2368 "gaim"
2369 #endif
2370 );
2371 gaim_prefs_set_bool("/gaim/gtk/idle/report", FALSE);
2372 }
2373 2338
2374 /* Remove some no-longer-used prefs */ 2339 /* Remove some no-longer-used prefs */
2375 gaim_prefs_remove("/gaim/gtk/blist/auto_expand_contacts"); 2340 gaim_prefs_remove("/gaim/gtk/blist/auto_expand_contacts");
2376 gaim_prefs_remove("/gaim/gtk/blist/button_style"); 2341 gaim_prefs_remove("/gaim/gtk/blist/button_style");
2377 gaim_prefs_remove("/gaim/gtk/blist/grey_idle_buddies"); 2342 gaim_prefs_remove("/gaim/gtk/blist/grey_idle_buddies");
2380 gaim_prefs_remove("/gaim/gtk/blist/show_idle_time"); 2345 gaim_prefs_remove("/gaim/gtk/blist/show_idle_time");
2381 gaim_prefs_remove("/gaim/gtk/blist/show_warning_level"); 2346 gaim_prefs_remove("/gaim/gtk/blist/show_warning_level");
2382 gaim_prefs_remove("/gaim/gtk/conversations/button_type"); 2347 gaim_prefs_remove("/gaim/gtk/conversations/button_type");
2383 gaim_prefs_remove("/gaim/gtk/conversations/ctrl_enter_sends"); 2348 gaim_prefs_remove("/gaim/gtk/conversations/ctrl_enter_sends");
2384 gaim_prefs_remove("/gaim/gtk/conversations/enter_sends"); 2349 gaim_prefs_remove("/gaim/gtk/conversations/enter_sends");
2350 gaim_prefs_remove("/gaim/gtk/conversations/escape_closes");
2385 gaim_prefs_remove("/gaim/gtk/conversations/html_shortcuts"); 2351 gaim_prefs_remove("/gaim/gtk/conversations/html_shortcuts");
2386 gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs"); 2352 gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs");
2387 gaim_prefs_remove("/gaim/gtk/conversations/send_formatting"); 2353 gaim_prefs_remove("/gaim/gtk/conversations/send_formatting");
2388 gaim_prefs_remove("/gaim/gtk/conversations/show_smileys"); 2354 gaim_prefs_remove("/gaim/gtk/conversations/show_smileys");
2389 gaim_prefs_remove("/gaim/gtk/conversations/show_timestamps"); 2355 gaim_prefs_remove("/gaim/gtk/conversations/show_timestamps");
2398 gaim_prefs_remove("/gaim/gtk/conversations/im/hide_on_send"); 2364 gaim_prefs_remove("/gaim/gtk/conversations/im/hide_on_send");
2399 gaim_prefs_remove("/gaim/gtk/conversations/chat/color_nicks"); 2365 gaim_prefs_remove("/gaim/gtk/conversations/chat/color_nicks");
2400 gaim_prefs_remove("/gaim/gtk/conversations/chat/raise_on_events"); 2366 gaim_prefs_remove("/gaim/gtk/conversations/chat/raise_on_events");
2401 gaim_prefs_remove("/gaim/gtk/conversations/ignore_fonts"); 2367 gaim_prefs_remove("/gaim/gtk/conversations/ignore_fonts");
2402 gaim_prefs_remove("/gaim/gtk/conversations/ignore_font_sizes"); 2368 gaim_prefs_remove("/gaim/gtk/conversations/ignore_font_sizes");
2369 gaim_prefs_remove("/gaim/gtk/idle/method");
2403 gaim_prefs_remove("/gaim/gtk/logging/individual_logs"); 2370 gaim_prefs_remove("/gaim/gtk/logging/individual_logs");
2404 gaim_prefs_remove("/gaim/gtk/sound/signon"); 2371 gaim_prefs_remove("/gaim/gtk/sound/signon");
2405 gaim_prefs_remove("/gaim/gtk/sound/silent_signon"); 2372 gaim_prefs_remove("/gaim/gtk/sound/silent_signon");
2406 gaim_prefs_remove("/gaim/gtk/conversations/escape_closes"); 2373 }
2407 }