~ubuntu-branches/ubuntu/oneiric/gimp/oneiric-security

« back to all changes in this revision

Viewing changes to app/gui/gimpdbusservice.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-11-24 14:16:39 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20081124141639-12b1g29vvadd5pzp
Tags: 2.6.3-1ubuntu1
* Sync with Debian experimental (LP: #301724)
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch:
  - updated some strings for ubuntu
* debian/rules:
  - updated translation templates
* debian/control:
  - Drop webkit build dependency. gimp is the only thing pulling
    in webkit for the desktop CDs, and makes them explode
    Without the webkit help browser
    plugin, help will just be displayed in the default browser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "gimpdbusservice-glue.h"
40
40
 
41
41
 
 
42
enum
 
43
{
 
44
  OPENED,
 
45
  LAST_SIGNAL
 
46
};
 
47
 
42
48
typedef struct
43
49
{
44
50
  gchar    *uri;
52
58
static void       gimp_dbus_service_dispose        (GObject          *object);
53
59
static void       gimp_dbus_service_finalize       (GObject          *object);
54
60
 
 
61
static void       gimp_dbus_service_gimp_opened    (Gimp             *gimp,
 
62
                                                    const gchar      *uri,
 
63
                                                    GimpDBusService  *service);
 
64
 
55
65
static gboolean   gimp_dbus_service_queue_open     (GimpDBusService  *service,
56
66
                                                    const gchar      *uri,
57
67
                                                    gboolean          as_new);
67
77
 
68
78
#define parent_class gimp_dbus_service_parent_class
69
79
 
 
80
static guint gimp_dbus_service_signals[LAST_SIGNAL] = { 0 };
 
81
 
70
82
 
71
83
static void
72
84
gimp_dbus_service_class_init (GimpDBusServiceClass *klass)
73
85
{
74
86
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
75
87
 
 
88
  gimp_dbus_service_signals[OPENED] =
 
89
    g_signal_new ("opened",
 
90
                  G_TYPE_FROM_CLASS (klass),
 
91
                  G_SIGNAL_RUN_FIRST,
 
92
                  G_STRUCT_OFFSET (GimpDBusServiceClass, opened),
 
93
                  NULL, NULL,
 
94
                  g_cclosure_marshal_VOID__STRING,
 
95
                  G_TYPE_NONE, 1, G_TYPE_STRING);
 
96
 
76
97
  object_class->dispose  = gimp_dbus_service_dispose;
77
98
  object_class->finalize = gimp_dbus_service_finalize;
78
99
 
97
118
 
98
119
  service->gimp = gimp;
99
120
 
 
121
  g_signal_connect_object (gimp, "image-opened",
 
122
                           G_CALLBACK (gimp_dbus_service_gimp_opened),
 
123
                           service, 0);
 
124
 
100
125
  return G_OBJECT (service);
101
126
}
102
127
 
185
210
  return TRUE;
186
211
}
187
212
 
 
213
static void
 
214
gimp_dbus_service_gimp_opened (Gimp            *gimp,
 
215
                               const gchar     *uri,
 
216
                               GimpDBusService *service)
 
217
{
 
218
  g_signal_emit (service, gimp_dbus_service_signals[OPENED], 0, uri);
 
219
}
 
220
 
188
221
/*
189
222
 * Adds a request to open a file to the end of the queue and
190
223
 * starts an idle source if it is not already running.