]> git.pld-linux.org Git - packages/gg2.git/blob - gg2-dbus.patch
- fix compilation with dbus >= 0.33 by Mateusz Bijak from ggadu-devel
[packages/gg2.git] / gg2-dbus.patch
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
4 @@ -141,7 +141,7 @@
5         {
6                 *syms[i].ptr = dlsym(handler, syms[i].name);
7  
8 -               if ((error = dlerror()) != NULL)
9 +               if ((error = (gchar *) dlerror()) != NULL)
10                 {
11                         g_warning(_("core: %s have no %s: %s\n"), path, syms[i].name, error);
12                         dlclose(handler);
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
16 @@ -250,8 +250,8 @@
17  static gpointer aaway_preferences(gpointer user_data)
18  {
19         GGaduDialog *d = ggadu_dialog_new(GGADU_DIALOG_CONFIG, _("Auto-Away Preferences"), "update config");
20 -       print_debug("%s: Preferences\n", "aaway");
21         gchar *utf = NULL;
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
29 @@ -45,7 +45,7 @@
30  
31  static DBusHandlerResult ofi_getPresence(DBusConnection * connection, DBusMessage * message, gpointer user_data)
32  {
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;
38 @@ -79,6 +79,7 @@
39                         {
40                                 DBusMessage *return_message;
41                                 GGaduContact *k = NULL;
42 +                               const gchar *arg_empty = "";
43                                 
44                                 return_message = dbus_message_new_method_return(message);
45  
46 @@ -107,13 +108,22 @@
47                                         /* not sure about this g_strdup() */
48                                         status_descr = k->status_descr ? g_strdup(k->status_descr) : "";
49                                         
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, 
55 +                                                       DBUS_TYPE_INVALID);
56                                         GGaduContact_free(k);
57                                 }
58                                 else
59                                 {
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, 
67 +                                                       DBUS_TYPE_INVALID);
68                                 }
69                                 /* I can free here because signal return copy of GGaduContact */
70                                 dbus_connection_send(connection, return_message, NULL);
71 @@ -121,7 +131,6 @@
72                         }
73                         plugins = plugins->next;
74                 }
75 -               dbus_free(contactURI);
76                 g_strfreev(URItab);
77                 g_free(contactURIhandler);
78         }
79 @@ -132,14 +141,14 @@
80  
81  static DBusHandlerResult ofi_getProtocols(DBusConnection * connection, DBusMessage * message, gpointer user_data)
82  {
83 +       GGaduProtocol *p = NULL;
84 +       gpointer key, index;
85 +       DBusMessage *return_message;
86         DBusError error;
87         dbus_error_init(&error);
88  
89         print_debug("getProtocols");
90  
91 -       GGaduProtocol *p = NULL;
92 -       gpointer key, index;
93 -       DBusMessage *return_message;
94  
95         return_message = dbus_message_new_method_return(message);
96  
97 @@ -154,7 +163,7 @@
98                         if (p)
99                         {
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);
103                         }
104  
105                         index = ggadu_repo_value_next("_protocols_", REPO_VALUE_PROTOCOL, &key, index);
106 @@ -171,7 +180,7 @@
107  
108  static DBusHandlerResult ofi_openChat(DBusConnection * connection, DBusMessage * message, gpointer user_data)
109  {
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;
115 @@ -224,10 +233,9 @@
116                 }
117                 g_strfreev(URItab);
118                 g_free(contactURIhandler);
119 -               dbus_free(contactURI);
120         }
121         
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);
127 @@ -247,7 +255,7 @@
128                     dbus_message_get_path(message), dbus_message_get_interface(message), dbus_message_get_type(message));
129  
130  
131 -       if (dbus_message_is_signal(message, DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL, "Disconnected"))
132 +       if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
133         {
134                 print_debug("dbus signal: Disconnected");
135                 return DBUS_HANDLER_RESULT_HANDLED;
136 @@ -305,7 +313,7 @@
137         dbus_connection_setup_with_g_main(bus, g_main_loop_get_context(config->main_loop));
138  
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))
143         {
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
148 @@ -109,6 +109,7 @@
149  //Przerysowuje elementy dynamiczne pixmapy
150  void draw_pixmap()
151  {
152 +       int i;
153  
154         //tlo ikony
155         gdk_draw_pixmap(launch_pixmap, gc , source_pixmap , 0 , 0 , 0 , 0 , 64 ,64);
156 @@ -121,7 +122,6 @@
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);
159  
160 -       int i;
161  
162         //Wyswietl 3 nicki w kolorach zalenych od statusu       
163         for (i = 0; i < NNICK; i++)
164 @@ -468,6 +468,10 @@
165  //Funkcja startowa pluginu, exportowana,musi byc
166  void start_plugin()
167  {
168 +       XWMHints wmhints;
169 +       GGaduMenu *root;
170 +       GGaduMenu *item_tl;
171 +
172         print_debug("%s : start\n", GGadu_PLUGIN_NAME);
173  
174         //Etykietki
175 @@ -529,7 +533,6 @@
176         redraw();
177  
178         //Windowmaker hints - tu sprowadza okno do ikony
179 -       XWMHints wmhints;
180         wmhints.initial_state = WithdrawnState;
181         wmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
182         wmhints.icon_x = 0;
183 @@ -553,8 +556,8 @@
184         register_signal(handler, "docklet set default icon");
185         ggadu_repo_watch_add(NULL, REPO_ACTION_VALUE_CHANGE, REPO_VALUE_CONTACT, notify_callback);
186  
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);
191                 
192         ggadu_menu_add_submenu(item_tl, ggadu_menu_new_item(_("_Preferences"), user_preferences_action, NULL));
193  
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
197 @@ -851,6 +851,7 @@
198         gint percent = 0;
199         gint number_of_workspaces = 0;
200         GtkWidget *chat_notebook_paned_size = NULL;
201 +       PangoFontDescription *font_desc;
202  
203         if (!session || !plugin_name || !id)
204                 return NULL;
205 @@ -1117,7 +1118,6 @@
206  
207      /* set font of the message editing text_view */
208  
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 @@
217         {
218                 GSList *combo_theme_slist;
219                 GSList *combo_icons_slist;
220 +               GSList *combo_skins_slist;
221 +#ifdef USE_GTKSPELL
222 +               GSList *dict_slist;
223 +#endif
224                 if (plugins_updated)
225                 {
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)));
229  
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");
233  
234                 g_return_if_fail(entry != NULL);
235  
236 @@ -1441,7 +1445,7 @@
237                 entry = g_object_get_data(G_OBJECT(adv_vbox), "combo_skins");
238                 g_return_if_fail(entry != NULL);
239  
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");
242  
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
248 @@ -101,6 +101,7 @@
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);
251                     gchar *tmp = NULL;
252 +                   gchar *markup, *markup_descr;
253                     
254                     if(ggadu_config_var_get(gui_handler, "wrap_descr"))
255                     {
256 @@ -162,10 +163,10 @@
257                         tmp = NULL;
258                     } 
259  
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);
268                     g_free(markup);
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
272 @@ -92,16 +92,16 @@
273  
274         if (!jabber_data.connection || !lm_connection_is_open(jabber_data.connection))
275         {
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);
280 -
281                 /* proxy setting taken from EKG project */
282                 gint jabber_proxy_enabled = 0;
283                 gchar *jabber_proxy_host = NULL;
284                 gint jabber_proxy_port;
285  
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);
290 +
291                 if (ggadu_config_var_check(jabber_handler, "proxy"))
292                 {
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 @@
298  
299         if (ggadu_config_var_get(jabber_handler, "autoconnect"))
300         {
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);
308         }
This page took 0.059401 seconds and 3 git commands to generate.