GLeaker

GLeaker Commit Details

Date:2013-05-22 14:51:02 (5 years 1 month ago)
Author:Nicola Fontana
Branch:master
Commit:dd44f0f816792b2ab8b75f312fb056f83ac26636
Parents: 5b9d48d8a87c869c2674719207e6fdcdb600a544
Message:Refactored main() code

Changes:
Msrc/gleaker.c (2 diffs)

File differences

src/gleaker.c
238238
239239
240240
241
242
243
244241
245242
246243
247
248
244
245
249246
250
247
248
249
250
251
252
251253
252254
253
254
255
256
255257
256
257258
258259
259
260
261
262
263260
264261
265262
......
272269
273270
274271
275
276272
277273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
g_signal_connect(window, "delete-event",
G_CALLBACK(gtk_main_quit), NULL);
/* Add goffice support */
libgoffice_init();
return window;
}
static void
shutdown(void)
static gint
gleaker_init(gint argc, gchar **argv)
{
libgoffice_shutdown();
if (! parse_args(&argc, &argv))
return 1;
libgoffice_init();
return 0;
}
gint
main(gint argc, gchar **argv)
static gint
gleaker_run(void)
{
gchar *path;
GtkBuilder *builder;
GtkWidget *window;
if (! parse_args(&argc, &argv))
return 1;
builder = get_builder("gleaker.ui");
if (builder == NULL)
return 2;
gtk_widget_show_all(window);
gtk_main();
shutdown();
return 0;
}
static void
gleaker_shutdown(void)
{
libgoffice_shutdown();
}
gint
main(gint argc, gchar **argv)
{
gint status;
status = gleaker_init(argc, argv);
if (status == 0) {
status = gleaker_run();
gleaker_shutdown();
}
return status;
}

Archive Download the corresponding diff file

Branches