Gentoo Archives: gentoo-commits

From: "Romain Perier (mrpouet)" <mrpouet@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-pda/gnome-pilot/files: gnome-pilot-2.0.17-invisible-applet.patch
Date: Sun, 23 Aug 2009 10:53:19
Message-Id: E1MfAhK-00081T-0E@stork.gentoo.org
1 mrpouet 09/08/23 10:53:18
2
3 Added: gnome-pilot-2.0.17-invisible-applet.patch
4 Log:
5 Fix bug #282354, applet did not appear into panel due to missing call to gnome_program_init(). Patch import from upstream bug #584894
6 (Portage version: 2.2_rc39/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 app-pda/gnome-pilot/files/gnome-pilot-2.0.17-invisible-applet.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/gnome-pilot/files/gnome-pilot-2.0.17-invisible-applet.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/gnome-pilot/files/gnome-pilot-2.0.17-invisible-applet.patch?rev=1.1&content-type=text/plain
13
14 Index: gnome-pilot-2.0.17-invisible-applet.patch
15 ===================================================================
16 From d1c148903394634a69fb978fc214a18d006c8f7a Mon Sep 17 00:00:00 2001
17 From: Matt Davey <mcdavey@×××××××××××.uk>
18 Date: Thu, 06 Aug 2009 19:12:56 +0000
19 Subject: 2009-08-06 Matt Davey <mcdavey@×××××××××××.uk>
20
21 * applet/pilot.c: Fix for bug #584894. gnome panel-applet code
22 was changed in gnome-2.25 and now it does not call
23 gnome_program_init, which the gnome-pilot applet code assumed
24 ---
25 diff --git a/applet/pilot.c b/applet/pilot.c
26 index 9ca8453..0e07585 100644
27 --- a/applet/pilot.c
28 +++ b/applet/pilot.c
29 @@ -29,7 +29,7 @@
30 #include <errno.h>
31 #include <gnome.h>
32 #include <glade/glade.h>
33 -#include <libgnomeui/gnome-window-icon.h>
34 +#include <gtk/gtk.h>
35 #include <panel-applet-gconf.h>
36
37 #include <signal.h>
38 @@ -59,6 +59,7 @@ typedef struct {
39
40 typedef enum { INITIALISING, PAUSED, CONNECTING_TO_DAEMON, SYNCING, WAITING, NUM_STATES } state;
41
42 +
43 char *pixmaps[] =
44 {
45 GNOME_ICONDIR "/sync_broken.png",
46 @@ -131,6 +132,7 @@ gpilotd_connect_cb (GnomePilotClient *client,
47 {
48 GdkColormap *colormap;
49 gchar *buf;
50 + GError *error;
51 PilotApplet *applet = PILOT_APPLET (user_data);
52
53 gtk_tooltips_set_tip (applet->tooltips, GTK_WIDGET(applet->applet),
54 @@ -146,8 +148,8 @@ gpilotd_connect_cb (GnomePilotClient *client,
55 if (applet->properties.popups == FALSE) return;
56
57 if (applet->progressDialog == NULL) {
58 - gnome_window_icon_set_default_from_file (
59 - GNOME_ICONDIR "/sync_icon.png");
60 + gtk_window_set_default_icon_from_file (
61 + GNOME_ICONDIR "/sync_icon.png", &error);
62 GladeXML *xml = glade_xml_new (applet->glade_file,"ProgressDialog",NULL);
63 applet->progressDialog = glade_xml_get_widget (xml,"ProgressDialog");
64 applet->sync_label = glade_xml_get_widget (xml,"sync_label");
65 @@ -427,7 +429,10 @@ handle_client_error (PilotApplet *self)
66
67 static void
68 about_cb(BonoboUIComponent *uic, PilotApplet *pilot, const gchar *verbname)
69 +
70 {
71 + GError *error;
72 +
73 GtkWidget *about;
74 const gchar *authors[] = {"Vadim Strizhevsky <vadim@×××××××××.net>",
75 "Eskil Heyn Olsen, <eskil@×××××.dk>",
76 @@ -437,8 +442,15 @@ about_cb(BonoboUIComponent *uic, PilotApplet *pilot, const gchar *verbname)
77 "Matt Davey <mcdavey@×××××××××××.uk>",
78 NULL};
79
80 - gnome_window_icon_set_default_from_file (
81 - GNOME_ICONDIR "/sync_icon.png");
82 + gtk_window_set_default_icon_from_file (
83 + GNOME_ICONDIR "/sync_icon.png", &error);
84 +
85 +
86 + if (error)
87 + {
88 + g_warning ("Can't find icon: " GNOME_ICONDIR "/sync_icon.png" );
89 + }
90 +
91 about = gnome_about_new (_("gnome-pilot applet"),
92 VERSION,
93 _("Copyright 2000-2006 Free Software Foundation, Inc."),
94 @@ -493,8 +505,9 @@ properties_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname
95 PilotApplet *self = user_data;
96 GtkWidget *button, *entry, *dialog;
97 GladeXML *xml;
98 + GError *error;
99
100 - gnome_window_icon_set_default_from_file (GNOME_ICONDIR "/sync_icon.png");
101 + gtk_window_set_default_icon_from_file (GNOME_ICONDIR "/sync_icon.png", &error);
102 xml =glade_xml_new (self->glade_file,"PropertiesDialog", NULL);
103 dialog=glade_xml_get_widget (xml,"PropertiesDialog");
104
105 @@ -1325,7 +1338,6 @@ static void
106 create_pilot_widgets (GtkWidget *widget, PilotApplet *self)
107 {
108 GtkStyle *style;
109 - int i;
110
111 static GtkTargetEntry drop_types [] = {
112 { "text/uri-list", 0, TARGET_URI_LIST },
113 @@ -1345,10 +1357,10 @@ create_pilot_widgets (GtkWidget *widget, PilotApplet *self)
114
115 self->curstate = INITIALISING;
116
117 - for (i = 0; i < sizeof (pixmaps)/sizeof (pixmaps[0]); i++)
118 + /* for (i = 0; i < sizeof (pixmaps)/sizeof (pixmaps[0]); i++)
119 pixmaps[i] = gnome_program_locate_file(
120 NULL, GNOME_FILE_DOMAIN_PIXMAP, pixmaps[i], TRUE, NULL);
121 -
122 + */
123 self->image = gtk_image_new_from_file (pixmaps[self->curstate]);
124
125 gtk_signal_connect (GTK_OBJECT (widget), "button-press-event",
126 --
127 cgit v0.8.2