1 diff -urN gg2-2.2.7.orig/lib/plugins.c gg2-2.2.7/lib/plugins.c
2 --- gg2-2.2.7.orig/lib/plugins.c 2005-08-21 23:08:02.158950496 +0200
3 +++ gg2-2.2.7/lib/plugins.c 2005-08-21 23:08:14.883016144 +0200
6 *syms[i].ptr = dlsym(handler, syms[i].name);
8 - if ((error = dlerror()) != NULL)
9 + if ((error = (gchar *) dlerror()) != NULL)
11 g_warning(_("core: %s have no %s: %s\n"), path, syms[i].name, error);
13 diff -urN gg2-2.2.7.orig/src/plugins/aaway/aaway.c gg2-2.2.7/src/plugins/aaway/aaway.c
14 --- gg2-2.2.7.orig/src/plugins/aaway/aaway.c 2005-08-21 23:08:02.189945784 +0200
15 +++ gg2-2.2.7/src/plugins/aaway/aaway.c 2005-08-21 23:08:14.889015232 +0200
17 static gpointer aaway_preferences(gpointer user_data)
19 GGaduDialog *d = ggadu_dialog_new(GGADU_DIALOG_CONFIG, _("Auto-Away Preferences"), "update config");
20 - print_debug("%s: Preferences\n", "aaway");
22 + print_debug("%s: Preferences\n", "aaway");
23 ggadu_dialog_add_entry(d, GGADU_AAWAY_CONFIG_ENABLE_AUTOAWAY, _("Enable auto-away"), VAR_BOOL, (gpointer) ggadu_config_var_get(handler, "enable"), VAR_FLAG_ADVANCED);
24 ggadu_dialog_add_entry(d, GGADU_AAWAY_CONFIG_INTERVAL, _("Auto away after time (minutes)"), VAR_INT, (gpointer) ggadu_config_var_get(handler, "interval"), VAR_FLAG_NONE);
25 ggadu_dialog_add_entry(d, GGADU_AAWAY_CONFIG_ENABLE_AWAY_MSG, _("Enable away message"), VAR_BOOL,
26 diff -urN gg2-2.2.7.orig/src/plugins/dbus/dbus_plugin.c gg2-2.2.7/src/plugins/dbus/dbus_plugin.c
27 --- gg2-2.2.7.orig/src/plugins/dbus/dbus_plugin.c 2005-08-21 23:08:02.163949736 +0200
28 +++ gg2-2.2.7/src/plugins/dbus/dbus_plugin.c 2005-08-21 23:08:14.889015232 +0200
31 static DBusHandlerResult ofi_getPresence(DBusConnection * connection, DBusMessage * message, gpointer user_data)
33 - /* URI of the user which we have to return presence. ex. gg://13245 */
34 + /* URI of the user which we have to return presence. ex. gg:13245 */
35 gchar *contactURI = NULL;
36 gchar *contactURIhandler = NULL;
37 gchar *contactURIdata = NULL;
40 DBusMessage *return_message;
41 GGaduContact *k = NULL;
42 + const gchar *arg_empty = "";
44 return_message = dbus_message_new_method_return(message);
47 /* not sure about this g_strdup() */
48 status_descr = k->status_descr ? g_strdup(k->status_descr) : "";
50 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, return_status, DBUS_TYPE_STRING, status_descr,DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
51 + dbus_message_append_args(return_message,
52 + DBUS_TYPE_STRING, &return_status,
53 + DBUS_TYPE_STRING, &status_descr,
54 + DBUS_TYPE_STRING, &arg_empty,
60 + const gchar *arg_unknown = "Unknown";
61 print_debug("NOT FOUND: Unknown");
62 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, "Unknown", DBUS_TYPE_STRING, "",DBUS_TYPE_STRING, "", DBUS_TYPE_INVALID);
63 + dbus_message_append_args(return_message,
64 + DBUS_TYPE_STRING, &arg_unknown,
65 + DBUS_TYPE_STRING, &arg_empty,
66 + DBUS_TYPE_STRING, &arg_empty,
69 /* I can free here because signal return copy of GGaduContact */
70 dbus_connection_send(connection, return_message, NULL);
73 plugins = plugins->next;
75 - dbus_free(contactURI);
77 g_free(contactURIhandler);
81 static DBusHandlerResult ofi_getProtocols(DBusConnection * connection, DBusMessage * message, gpointer user_data)
83 + GGaduProtocol *p = NULL;
84 + gpointer key, index;
85 + DBusMessage *return_message;
87 dbus_error_init(&error);
89 print_debug("getProtocols");
91 - GGaduProtocol *p = NULL;
92 - gpointer key, index;
93 - DBusMessage *return_message;
95 return_message = dbus_message_new_method_return(message);
100 print_debug("proto: %s", p->protocol_uri);
101 - dbus_message_append_args(return_message, DBUS_TYPE_STRING, p->protocol_uri, DBUS_TYPE_INVALID);
102 + dbus_message_append_args(return_message, DBUS_TYPE_STRING, &p->protocol_uri, DBUS_TYPE_INVALID);
105 index = ggadu_repo_value_next("_protocols_", REPO_VALUE_PROTOCOL, &key, index);
108 static DBusHandlerResult ofi_openChat(DBusConnection * connection, DBusMessage * message, gpointer user_data)
110 - /* URI of the user which we have to return presence. ex. gg://13245 */
111 + /* URI of the user which we have to return presence. ex. gg:13245 */
112 gchar *contactURI = NULL;
113 gchar *contactURIhandler = NULL;
114 gchar *contactURIdata = NULL;
118 g_free(contactURIhandler);
119 - dbus_free(contactURI);
122 - dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, ret, DBUS_TYPE_INVALID);
123 + dbus_message_append_args(return_message, DBUS_TYPE_BOOLEAN, &ret, DBUS_TYPE_INVALID);
124 dbus_connection_send(connection, return_message, NULL);
125 dbus_message_unref(return_message);
126 dbus_error_free(&error);
128 dbus_message_get_path(message), dbus_message_get_interface(message), dbus_message_get_type(message));
131 - if (dbus_message_is_signal(message, DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL, "Disconnected"))
132 + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
134 print_debug("dbus signal: Disconnected");
135 return DBUS_HANDLER_RESULT_HANDLED;
137 dbus_connection_setup_with_g_main(bus, g_main_loop_get_context(config->main_loop));
139 dbus_error_init(&derror);
140 - dbus_bus_acquire_service(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
141 + dbus_bus_request_name(bus, DBUS_ORG_FREEDESKTOP_IM_SERVICE, 0, &derror);
142 if (dbus_error_is_set(&derror))
144 g_warning("DBUS: Failed to acquire IM service. %s", derror.message);
145 diff -urN gg2-2.2.7.orig/src/plugins/docklet/dockapp/dockapp_plugin.c gg2-2.2.7/src/plugins/docklet/dockapp/dockapp_plugin.c
146 --- gg2-2.2.7.orig/src/plugins/docklet/dockapp/dockapp_plugin.c 2005-08-21 23:08:02.182946848 +0200
147 +++ gg2-2.2.7/src/plugins/docklet/dockapp/dockapp_plugin.c 2005-08-21 23:08:14.890015080 +0200
149 //Przerysowuje elementy dynamiczne pixmapy
155 gdk_draw_pixmap(launch_pixmap, gc , source_pixmap , 0 , 0 , 0 , 0 , 64 ,64);
157 if ((icon2_img != NULL) && ((blink_no % 2) == 1))
158 gdk_draw_pixbuf(launch_pixmap, gc, icon2_img, 0, 0, icon2.x, icon2.y, icon2.width, icon2.height, GDK_RGB_DITHER_NONE, 0, 0);
162 //Wyswietl 3 nicki w kolorach zalenych od statusu
163 for (i = 0; i < NNICK; i++)
165 //Funkcja startowa pluginu, exportowana,musi byc
170 + GGaduMenu *item_tl;
172 print_debug("%s : start\n", GGadu_PLUGIN_NAME);
178 //Windowmaker hints - tu sprowadza okno do ikony
180 wmhints.initial_state = WithdrawnState;
181 wmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
184 register_signal(handler, "docklet set default icon");
185 ggadu_repo_watch_add(NULL, REPO_ACTION_VALUE_CHANGE, REPO_VALUE_CONTACT, notify_callback);
187 - GGaduMenu *root = ggadu_menu_create();
188 - GGaduMenu *item_tl = ggadu_menu_add_item(root, "_Dockapp", NULL, NULL);
189 + root = ggadu_menu_create();
190 + item_tl = ggadu_menu_add_item(root, "_Dockapp", NULL, NULL);
192 ggadu_menu_add_submenu(item_tl, ggadu_menu_new_item(_("_Preferences"), user_preferences_action, NULL));
194 diff -urN gg2-2.2.7.orig/src/plugins/GUI/gui_chat.c gg2-2.2.7/src/plugins/GUI/gui_chat.c
195 --- gg2-2.2.7.orig/src/plugins/GUI/gui_chat.c 2005-08-21 23:08:02.174948064 +0200
196 +++ gg2-2.2.7/src/plugins/GUI/gui_chat.c 2005-08-21 23:08:14.884015992 +0200
199 gint number_of_workspaces = 0;
200 GtkWidget *chat_notebook_paned_size = NULL;
201 + PangoFontDescription *font_desc;
203 if (!session || !plugin_name || !id)
205 @@ -1117,7 +1118,6 @@
207 /* set font of the message editing text_view */
209 - PangoFontDescription *font_desc;
210 fontstr = ggadu_config_var_get(gui_handler, "msg_out_edit_font");
211 font_desc = pango_font_description_from_string (fontstr);
212 gtk_widget_modify_font (input, font_desc);
213 diff -urN gg2-2.2.7.orig/src/plugins/GUI/gui_preferences.c gg2-2.2.7/src/plugins/GUI/gui_preferences.c
214 --- gg2-2.2.7.orig/src/plugins/GUI/gui_preferences.c 2005-08-21 23:08:02.177947608 +0200
215 +++ gg2-2.2.7/src/plugins/GUI/gui_preferences.c 2005-08-21 23:08:14.886015688 +0200
216 @@ -1322,6 +1322,10 @@
218 GSList *combo_theme_slist;
219 GSList *combo_icons_slist;
220 + GSList *combo_skins_slist;
222 + GSList *dict_slist;
226 GIOChannel *ch = g_io_channel_new_file(g_build_filename(config->configdir, "modules.load", NULL), "w",
227 @@ -1355,7 +1359,7 @@
228 ggadu_config_var_set(gui_handler, "use_spell", (gpointer) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entry)));
230 entry = g_object_get_data(G_OBJECT(chat_vbox), "combo_spell");
231 - GSList *dict_slist = g_object_get_data(G_OBJECT(entry), "dictionary_slist");
232 + dict_slist = g_object_get_data(G_OBJECT(entry), "dictionary_slist");
234 g_return_if_fail(entry != NULL);
236 @@ -1441,7 +1445,7 @@
237 entry = g_object_get_data(G_OBJECT(adv_vbox), "combo_skins");
238 g_return_if_fail(entry != NULL);
240 - GSList *combo_skins_slist = g_object_get_data(G_OBJECT(entry), "combo_skins_slist");
241 + combo_skins_slist = g_object_get_data(G_OBJECT(entry), "combo_skins_slist");
243 if (gtk_combo_box_get_active(GTK_COMBO_BOX(entry))) {
244 ggadu_config_var_set(gui_handler, "skin", (gpointer) g_strdup(g_slist_nth_data(combo_skins_slist, gtk_combo_box_get_active(GTK_COMBO_BOX(entry)))));
245 diff -urN gg2-2.2.7.orig/src/plugins/GUI/gui_userview.c gg2-2.2.7/src/plugins/GUI/gui_userview.c
246 --- gg2-2.2.7.orig/src/plugins/GUI/gui_userview.c 2005-08-21 23:08:02.176947760 +0200
247 +++ gg2-2.2.7/src/plugins/GUI/gui_userview.c 2005-08-21 23:14:49.377043936 +0200
249 if (ggadu_config_var_get(gui_handler, "descr_on_list") && k->status_descr) {
250 gchar *descr = ggadu_convert("UTF-8", "ISO-8859-2", k->status_descr);
252 + gchar *markup, *markup_descr;
254 if(ggadu_config_var_get(gui_handler, "wrap_descr"))
256 @@ -162,10 +163,10 @@
260 - gchar *markup_descr = ggadu_config_var_get(gui_handler, "wrap_descr") ?
261 + markup_descr = ggadu_config_var_get(gui_handler, "wrap_descr") ?
262 g_markup_escape_text(descr, strlen(descr)) :
263 g_markup_escape_text(k->status_descr, strlen(k->status_descr));
264 - gchar *markup = g_strdup_printf("%s\n<small>%s</small>", k->nick, markup_descr);
265 + markup = g_strdup_printf("%s\n<small>%s</small>", k->nick, markup_descr);
266 g_object_set(G_OBJECT(renderer), "text", NULL, "markup", markup, NULL);
267 g_free(markup_descr);
269 diff -urN gg2-2.2.7.orig/src/plugins/jabber/jabber_login.c gg2-2.2.7/src/plugins/jabber/jabber_login.c
270 --- gg2-2.2.7.orig/src/plugins/jabber/jabber_login.c 2005-08-21 23:08:02.185946392 +0200
271 +++ gg2-2.2.7/src/plugins/jabber/jabber_login.c 2005-08-21 23:08:14.890015080 +0200
274 if (!jabber_data.connection || !lm_connection_is_open(jabber_data.connection))
276 - portstr ? print_debug("jabber: Connecting to %s:%s with %s", server, portstr, jid) :
277 - print_debug("jabber: Connecting to %s with %s", server, jid);
278 - jabber_data.connection = lm_connection_new(server);
279 - lm_connection_set_keep_alive_rate(jabber_data.connection,30);
281 /* proxy setting taken from EKG project */
282 gint jabber_proxy_enabled = 0;
283 gchar *jabber_proxy_host = NULL;
284 gint jabber_proxy_port;
286 + portstr ? print_debug("jabber: Connecting to %s:%s with %s", server, portstr, jid) :
287 + print_debug("jabber: Connecting to %s with %s", server, jid);
288 + jabber_data.connection = lm_connection_new(server);
289 + lm_connection_set_keep_alive_rate(jabber_data.connection,30);
291 if (ggadu_config_var_check(jabber_handler, "proxy"))
293 gchar **auth = array_make((gchar *) ggadu_config_var_get(jabber_handler, "proxy"), "@", 0, 0, 0);
294 diff -urN gg2-2.2.7.orig/src/plugins/jabber/jabber_plugin.c gg2-2.2.7/src/plugins/jabber/jabber_plugin.c
295 --- gg2-2.2.7.orig/src/plugins/jabber/jabber_plugin.c 2005-08-21 23:08:02.185946392 +0200
296 +++ gg2-2.2.7/src/plugins/jabber/jabber_plugin.c 2005-08-21 23:08:14.892014776 +0200
297 @@ -1503,9 +1503,10 @@
299 if (ggadu_config_var_get(jabber_handler, "autoconnect"))
301 + GGaduStatusPrototype *sp;
302 gint auto_status = (gint) ggadu_config_var_get(jabber_handler, "auto_status");
303 print_debug("jabber: autoconneting");
304 - GGaduStatusPrototype *sp = ggadu_find_status_prototype(p, auto_status ? auto_status : JABBER_STATUS_AVAILABLE);
305 + sp = ggadu_find_status_prototype(p, auto_status ? auto_status : JABBER_STATUS_AVAILABLE);
306 jabber_change_status(sp, FALSE);
307 GGaduStatusPrototype_free(sp);