~noskcaj/ubuntu/trusty/tumbler/0.1.30

« back to all changes in this revision

Viewing changes to tumblerd/main.c

  • Committer: Package Import Robot
  • Author(s): Yves-Alexis Perez, Lionel Le Folgoc, Yves-Alexis Perez
  • Date: 2012-02-05 21:03:17 UTC
  • mfrom: (4.1.2)
  • Revision ID: package-import@ubuntu.com-20120205210317-bnl5qa1pxpro64ih
Tags: 0.1.23-1
[ Lionel Le Folgoc ]
* New upstream release:
  - fix crashes in the pixbuf thumbnailer.                        lp: #804921
* debian/control: build-depends on libgsf-1-dev and libopenrawgnome-dev to
  enable the new thumbnailers.
* debian/copyright: fix EOLs.
* Add a new binary package, tumbler-plugins-extra, to ship plugins using
  libraries not present in the default xfce desktop (openraw, gsf), and let
  tumbler suggest it.
* debian/patches:
  - 02_start-gst-pipeline.patch: dropped, applied upstream.
  - 01_fix-link-lm.patch: refreshed for the new plugins.
* debian/libtumbler-1-dev.install: updated, .a files aren't created anymore.

[ Yves-Alexis Perez ]
* debian/watch updated for new tumbler location.
* debian/control:
  - update debhelper build-dep to 9 now that it's released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
  /* set the program name */
75
75
  g_set_prgname (G_LOG_DOMAIN);
76
76
 
 
77
#ifdef DEBUG
 
78
  /* if something doesn't work, fix your code instead! */
 
79
  g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
 
80
#endif
 
81
 
77
82
  /* set the application name. Translators: Don't translate "Tumbler". */
78
83
  g_set_application_name (_("Tumbler Thumbnailing Service"));
79
84
 
99
104
  /* create the lifecycle manager */
100
105
  lifecycle_manager = tumbler_lifecycle_manager_new ();
101
106
 
102
 
  /* create the thumbnail cache service */
103
 
  cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
104
 
 
105
 
  /* try to start the service and exit if that fails */
106
 
  if (!tumbler_cache_service_start (cache_service, &error))
107
 
    {
108
 
      g_warning (_("Failed to start the thumbnail cache service: %s"), error->message);
109
 
      g_error_free (error);
110
 
 
111
 
      g_object_unref (cache_service);
112
 
 
113
 
      dbus_g_connection_unref (connection);
114
 
 
115
 
      return EXIT_FAILURE;
116
 
    }
117
 
 
118
107
  /* create the thumbnailer registry */
119
108
  registry = tumbler_registry_new ();
120
109
 
152
141
  /* update the URI schemes / MIME types supported information */
153
142
  tumbler_registry_update_supported (registry);
154
143
 
 
144
  /* create the thumbnail cache service */
 
145
  cache_service = tumbler_cache_service_new (connection, lifecycle_manager);
 
146
 
 
147
  /* create the thumbnailer manager service */
 
148
  manager = tumbler_manager_new (connection, lifecycle_manager, registry);
 
149
 
 
150
  /* create the generic thumbnailer service */
 
151
  service = tumbler_service_new (connection, lifecycle_manager, registry);
 
152
 
155
153
  /* try to load specialized thumbnailers and exit if that fails */
156
154
  if (!tumbler_registry_load (registry, &error))
157
155
    {
159
157
                 error->message);
160
158
      g_error_free (error);
161
159
 
 
160
      g_object_unref (service);
 
161
      g_object_unref (manager);
 
162
      g_object_unref (cache_service);
162
163
      g_object_unref (registry);
163
 
      g_object_unref (cache_service);
164
164
 
165
165
      dbus_g_connection_unref (connection);
166
166
 
167
167
      return EXIT_FAILURE;
168
168
    }
169
169
 
170
 
  /* create the thumbnailer manager service */
171
 
  manager = tumbler_manager_new (connection, lifecycle_manager, registry);
 
170
  /* try to start the service and exit if that fails */
 
171
  if (!tumbler_cache_service_start (cache_service, &error))
 
172
    {
 
173
      g_warning (_("Failed to start the thumbnail cache service: %s"), error->message);
 
174
      g_error_free (error);
 
175
 
 
176
      g_object_unref (service);
 
177
      g_object_unref (manager);
 
178
      g_object_unref (cache_service);
 
179
      g_object_unref (registry);
 
180
 
 
181
      dbus_g_connection_unref (connection);
 
182
 
 
183
      /* service already running, exit gracefully to not break clients */
 
184
      return EXIT_SUCCESS;
 
185
    }
172
186
 
173
187
  /* try to start the service and exit if that fails */
174
188
  if (!tumbler_manager_start (manager, &error))
176
190
      g_warning (_("Failed to start the thumbnailer manager: %s"), error->message);
177
191
      g_error_free (error);
178
192
 
 
193
      g_object_unref (service);
179
194
      g_object_unref (manager);
 
195
      g_object_unref (cache_service);
180
196
      g_object_unref (registry);
181
 
      g_object_unref (cache_service);
182
197
 
183
198
      dbus_g_connection_unref (connection);
184
199
 
185
 
      return EXIT_FAILURE;
 
200
      /* service already running, exit gracefully to not break clients */
 
201
      return EXIT_SUCCESS;
186
202
    }
187
203
 
188
 
  /* create the generic thumbnailer service */
189
 
  service = tumbler_service_new (connection, lifecycle_manager, registry);
190
 
 
191
204
  /* try to start the service and exit if that fails */
192
205
  if (!tumbler_service_start (service, &error))
193
206
    {
196
209
 
197
210
      g_object_unref (service);
198
211
      g_object_unref (manager);
 
212
      g_object_unref (cache_service);
199
213
      g_object_unref (registry);
200
 
      g_object_unref (cache_service);
201
214
 
202
215
      dbus_g_connection_unref (connection);
203
216
 
204
 
      return EXIT_FAILURE;
 
217
      /* service already running, exit gracefully to not break clients */
 
218
      return EXIT_SUCCESS;
205
219
    }
206
220
 
207
221
  /* create a new main loop */
220
234
  /* shut our services down and release all objects */
221
235
  g_object_unref (service);
222
236
  g_object_unref (manager);
 
237
  g_object_unref (cache_service);
223
238
  g_object_unref (registry);
224
 
  g_object_unref (cache_service);
225
239
  g_object_unref (lifecycle_manager);
226
240
 
227
241
  /* disconnect from the D-Bus session bus */