# HG changeset patch # User Nathan Walp # Date 1054447323 0 # Node ID 960fe32ea9b780e4e307740eb1605d95b8899e40 # Parent 4e2ffa3d9094d03263b7becf24cfd9d316b30a77 [gaim-migrate @ 6038] i'm tired, so i'm committing what i've got kingant will do a better job with what i hacked into oscar to make it work ;-) committer: Tailor Script diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/connection.c --- a/src/connection.c Sun Jun 01 05:18:43 2003 +0000 +++ b/src/connection.c Sun Jun 01 06:02:03 2003 +0000 @@ -5,7 +5,7 @@ * gaim * * Copyright (C) 2003 Christian Hammond - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/gaim.h --- a/src/gaim.h Sun Jun 01 05:18:43 2003 +0000 +++ b/src/gaim.h Sun Jun 01 06:02:03 2003 +0000 @@ -113,10 +113,6 @@ #define IM_FLAG_CHECKBOX 0x02 #define IM_FLAG_GAIMUSER 0x04 -#define IDLE_NONE 0 -#define IDLE_GAIM 1 -#define IDLE_SCREENSAVER 2 - #define PERMIT_ALL 1 #define PERMIT_NONE 2 #define PERMIT_SOME 3 diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/gaimrc.c --- a/src/gaimrc.c Sun Jun 01 05:18:43 2003 +0000 +++ b/src/gaimrc.c Sun Jun 01 06:02:03 2003 +0000 @@ -157,6 +157,10 @@ #define OPT_ACCT_REM_PASS 0x00000004 #define OPT_ACCT_MAIL_CHECK 0x00000008 +#define IDLE_NONE 0 +#define IDLE_GAIM 1 +#define IDLE_SCREENSAVER 2 + static guint misc_options; static guint logging_options; static guint blist_options; @@ -177,11 +181,10 @@ * was loaded from the file * or otherwise explicitly requested */ -int report_idle; -int web_browser; -struct save_pos blist_pos; -struct window_size conv_size, buddy_chat_size; -char web_command[2048] = ""; +static int web_browser; +static struct save_pos blist_pos; +static struct window_size conv_size, buddy_chat_size; +static char web_command[2048] = ""; static GdkColor fgcolor; static GdkColor bgcolor; @@ -786,17 +789,79 @@ read_display = TRUE; } else if (!strcmp(p->option, "misc_options")) { misc_options = atoi(p->value[0]); + gaim_prefs_set_bool("/gaim/gtk/debug/enabled", + (misc_options & OPT_MISC_DEBUG)); + gaim_prefs_set_bool("/gaim/gtk/browsers/new_window", + (misc_options & OPT_MISC_BROWSER_POPUP)); + gaim_prefs_set_bool("/gaim/gtk/conversations/im/send_typing", + !(misc_options & OPT_MISC_STEALTH_TYPING)); + gaim_prefs_set_bool("/gaim/gtk/buddies/use_server_alias", + (misc_options & OPT_MISC_USE_SERVER_ALIAS)); } else if (!strcmp(p->option, "logging_options")) { logging_options = atoi(p->value[0]); read_logging = TRUE; + gaim_prefs_set_bool("/gaim/gtk/logging/log_ims", + (logging_options & OPT_LOG_CONVOS)); + gaim_prefs_set_bool("/gaim/gtk/logging/strip_html", + (logging_options & OPT_LOG_STRIP_HTML)); + gaim_prefs_set_bool("/gaim/gtk/logging/individual_logs", + (logging_options & OPT_LOG_INDIVIDUAL)); + gaim_prefs_set_bool("/gaim/gtk/logging/log_chats", + (logging_options & OPT_LOG_CHATS)); } else if (!strcmp(p->option, "blist_options")) { blist_options = atoi(p->value[0]); + gaim_prefs_set_bool("/gaim/gtk/blist/show_group_count", + (blist_options & OPT_BLIST_SHOW_GRPNUM)); + gaim_prefs_set_bool("/gaim/gtk/blist/show_idle_time", + (blist_options & OPT_BLIST_SHOW_IDLETIME)); + gaim_prefs_set_bool("/gaim/gtk/blist/show_empty_groups", + !(blist_options & OPT_BLIST_NO_MT_GRP)); + gaim_prefs_set_bool("/gaim/gtk/blist/show_warning_level", + (blist_options & OPT_BLIST_SHOW_WARN)); + gaim_prefs_set_bool("/gaim/gtk/blist/grey_idle_buddies", + (blist_options & OPT_BLIST_GREY_IDLERS)); + gaim_prefs_set_bool("/gaim/gtk/blist/raise_on_events", + (blist_options & OPT_BLIST_POPUP)); + gaim_prefs_set_bool("/gaim/gtk/blist/show_buddy_icons", + (blist_options & OPT_BLIST_SHOW_ICONS)); + gaim_prefs_set_bool("/gaim/gtk/blist/show_offline_buddies", + (blist_options & OPT_BLIST_SHOW_OFFLINE)); } else if (!strcmp(p->option, "convo_options")) { convo_options = atoi(p->value[0]); + gaim_prefs_set_bool("/gaim/gtk/conversations/enter_sends", + (convo_options & OPT_CONVO_ENTER_SENDS)); + gaim_prefs_set_bool("/core/conversations/send_urls_as_links", + (convo_options & OPT_CONVO_SEND_LINKS)); + gaim_prefs_set_bool("/gaim/gtk/conversations/spellcheck", + (convo_options & OPT_CONVO_CHECK_SPELLING)); + gaim_prefs_set_bool("/gaim/gtk/conversations/html_shortcuts", + (convo_options & OPT_CONVO_CTL_CHARS)); + gaim_prefs_set_bool("/gaim/gtk/conversations/smiley_shortcuts", + (convo_options & OPT_CONVO_CTL_SMILEYS)); + gaim_prefs_set_bool("/gaim/gtk/conversations/escape_closes", + (convo_options & OPT_CONVO_ESC_CAN_CLOSE)); + gaim_prefs_set_bool("/gaim/gtk/conversations/ctrl_enter_sends", + (convo_options & OPT_CONVO_CTL_ENTER)); + gaim_prefs_set_bool("/gaim/gtk/conversations/show_timestamps", + (convo_options & OPT_CONVO_SHOW_TIME)); + gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_colors", + (convo_options & OPT_CONVO_IGNORE_COLOR)); + gaim_prefs_set_bool("/gaim/gtk/conversations/show_smileys", + (convo_options & OPT_CONVO_SHOW_SMILEY)); + gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_fonts", + (convo_options & OPT_CONVO_IGNORE_FONTS)); + gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_font_sizes", + (convo_options & OPT_CONVO_IGNORE_SIZES)); + gaim_prefs_set_bool("/core/conversations/combine_chat_im", + (convo_options & OPT_CONVO_COMBINE)); + gaim_prefs_set_bool("/gaim/gtk/conversations/ctrl_w_closes", + (convo_options & OPT_CONVO_CTL_W_CLOSES)); + gaim_prefs_set_bool("/gaim/gtk/conversations/close_on_tabs", + !(convo_options & OPT_CONVO_NO_X_ON_TAB)); } else if (!strcmp(p->option, "im_options")) { im_options = atoi(p->value[0]); - gaim_prefs_set_bool("/gaim/gtk/conversations/hide_im_on_send", + gaim_prefs_set_bool("/gaim/gtk/conversations/im/hide_on_send", (im_options & OPT_IM_POPDOWN)); } else if (!strcmp(p->option, "conv_placement")) { @@ -856,7 +921,20 @@ gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf); } else if (!strcmp(p->option, "report_idle")) { - report_idle = atoi(p->value[0]); + switch(atoi(p->value[0])) { + case IDLE_SCREENSAVER: + gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", + "system"); + break; + case IDLE_GAIM: + gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", + "gaim"); + break; + default: + gaim_prefs_set_string("/gaim/gtk/idle/reporting_method", + "none"); + break; + } } else if (!strcmp(p->option, "web_browser")) { web_browser = atoi(p->value[0]); } else if (!strcmp(p->option, "web_command")) { @@ -1183,6 +1261,7 @@ static void set_defaults() { +#if 0 int i; struct away_message *a; @@ -1268,6 +1347,7 @@ buddy_chat_size.width = 320; buddy_chat_size.height = 160; buddy_chat_size.entry_height = 50; +#endif } void load_prefs() diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/gtkblist.h --- a/src/gtkblist.h Sun Jun 01 05:18:43 2003 +0000 +++ b/src/gtkblist.h Sun Jun 01 06:02:03 2003 +0000 @@ -136,6 +136,7 @@ extern GSList *gaim_gtk_blist_sort_methods; struct gaim_gtk_blist_sort_method { + char *id; char *name; gaim_gtk_blist_sort_function func; }; @@ -143,25 +144,26 @@ /** * Registers a buddy list sorting method. * + * @param id The unique ID of the sorting method * @param name The method's name. * @param func A pointer to the function. * */ -void gaim_gtk_blist_sort_method_reg(const char *name, gaim_gtk_blist_sort_function func); +void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func); /** * Unregisters a buddy list sorting method. * - * @param name The method's name + * @param id The method's id */ -void gaim_gtk_blist_sort_method_unreg(const char *name); +void gaim_gtk_blist_sort_method_unreg(const char *id); /** * Sets a buddy list sorting method. * - * @param name The method's name. + * @param id The method's id. */ -void gaim_gtk_blist_sort_method_set(const char *name); +void gaim_gtk_blist_sort_method_set(const char *id); /** * Sets up the programs default sort methods diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/gtkdebug.c --- a/src/gtkdebug.c Sun Jun 01 05:18:43 2003 +0000 +++ b/src/gtkdebug.c Sun Jun 01 06:02:03 2003 +0000 @@ -87,7 +87,6 @@ win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); gaim_prefs_set_bool("/gaim/gtk/debug/timestamps", win->timestamps); - } static DebugWindow * diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/gtkprefs.c --- a/src/gtkprefs.c Sun Jun 01 05:18:43 2003 +0000 +++ b/src/gtkprefs.c Sun Jun 01 06:02:03 2003 +0000 @@ -881,10 +881,10 @@ vbox = gaim_gtk_make_frame (ret, _("Buddy List Sorting")); for (sl = gaim_gtk_blist_sort_methods; sl != NULL; sl = sl->next) { - char *name = ((struct gaim_gtk_blist_sort_method*)sl->data)->name; - - l = g_list_append(l, name); - l = g_list_append(l, name); + struct gaim_gtk_blist_sort_method *method = sl->data; + + l = g_list_append(l, method->name); + l = g_list_append(l, method->id); } prefs_dropdown_from_list(vbox, _("Sorting:"), GAIM_PREF_STRING, @@ -1025,7 +1025,7 @@ prefs_checkbox(_("_Raise windows on events"), "/gaim/gtk/conversations/im/raise_on_events", vbox); prefs_checkbox(_("Hide window on _send"), - "/gaim/gtk/conversations/hide_im_on_send", vbox); + "/gaim/gtk/conversations/im/hide_on_send", vbox); gtk_widget_show (vbox); vbox = gaim_gtk_make_frame (ret, _("Buddy Icons")); diff -r 4e2ffa3d9094 -r 960fe32ea9b7 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sun Jun 01 05:18:43 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sun Jun 01 06:02:03 2003 +0000 @@ -70,9 +70,6 @@ static GaimPlugin *my_protocol = NULL; -/* For win32 compatability */ -G_MODULE_IMPORT int report_idle; - static int caps_aim = AIM_CAPS_CHAT | AIM_CAPS_BUDDYICON | AIM_CAPS_IMIMAGE | AIM_CAPS_SENDFILE | AIM_CAPS_INTEROPERATE; static int caps_icq = AIM_CAPS_BUDDYICON | AIM_CAPS_IMIMAGE | AIM_CAPS_SENDFILE | AIM_CAPS_ICQUTF8 | AIM_CAPS_INTEROPERATE; @@ -4909,7 +4906,7 @@ } /* Presence settings (idle time visibility) */ if ((tmp = aim_ssi_getpresence(sess->ssi.local)) != 0xFFFFFFFF) - if (report_idle && !(tmp & 0x400)) + if (!(tmp & 0x400)) aim_ssi_setpresence(sess, tmp | 0x400); } /* end adding buddies from local list to server list */