Merge lp://staging/~bratsche/xsplash/improve-logging into lp://staging/xsplash

Proposed by Cody Russell
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~bratsche/xsplash/improve-logging
Merge into: lp://staging/xsplash
Diff against target: 205 lines
1 file modified
src/xsplash.c (+29/-29)
To merge this branch: bzr merge lp://staging/~bratsche/xsplash/improve-logging
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+12552@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/xsplash.c'
--- src/xsplash.c 2009-09-28 16:30:02 +0000
+++ src/xsplash.c 2009-09-28 21:35:19 +0000
@@ -328,26 +328,26 @@
328 width = gdk_screen_get_width (screen);328 width = gdk_screen_get_width (screen);
329 height = gdk_screen_get_height (screen);329 height = gdk_screen_get_height (screen);
330330
331 g_debug ("get_background_filename(): looking for appropriate resolution...");331 g_message ("get_background_filename(): looking for appropriate resolution...");
332 for (i = 0; i < (sizeof (widths) / sizeof (gint)); i++)332 for (i = 0; i < (sizeof (widths) / sizeof (gint)); i++)
333 {333 {
334 if (widths[i] > width && heights[i] && height)334 if (widths[i] > width && heights[i] && height)
335 {335 {
336 g_debug (" ** %dx%d will work.", widths[i], heights[i]);336 g_message (" ** %dx%d will work.", widths[i], heights[i]);
337 last_good = i;337 last_good = i;
338 }338 }
339 else339 else
340 {340 {
341 g_debug (" ** %dx%d is too small, using last good size.", widths[i], heights[i]);341 g_message (" ** %dx%d is too small, using last good size.", widths[i], heights[i]);
342 break;342 break;
343 }343 }
344 }344 }
345345
346 g_debug (" ** Found a resolution: %dx%d", widths[last_good], heights[last_good]);346 g_message (" ** Found a resolution: %dx%d", widths[last_good], heights[last_good]);
347347
348 ret = g_strdup_printf (DATADIR "/images/xsplash/bg_%dx%d.jpg", widths[last_good], heights[last_good]);348 ret = g_strdup_printf (DATADIR "/images/xsplash/bg_%dx%d.jpg", widths[last_good], heights[last_good]);
349349
350 g_debug (" ** filename: %s", ret);350 g_message (" ** filename: %s", ret);
351351
352 return ret;352 return ret;
353}353}
@@ -377,18 +377,18 @@
377377
378 if (throbber_image != NULL)378 if (throbber_image != NULL)
379 {379 {
380 g_debug ("get_throbber_filename(): user provided a throbber on the command line; using that");380 g_message ("get_throbber_filename(): user provided a throbber on the command line; using that");
381381
382 return g_strdup (throbber_image);382 return g_strdup (throbber_image);
383 }383 }
384384
385 g_debug ("get_throbber_filename(): looking for the best throbber for screen width...");385 g_message ("get_throbber_filename(): looking for the best throbber for screen width...");
386386
387 ret = g_strdup_printf (DATADIR "/images/xsplash/throbber_%s.png",387 ret = g_strdup_printf (DATADIR "/images/xsplash/throbber_%s.png",
388 get_filename_size_modifier (width));388 get_filename_size_modifier (width));
389389
390 g_debug (" ** Chose `%s'", get_filename_size_modifier (width));390 g_message (" ** Chose `%s'", get_filename_size_modifier (width));
391 g_debug (" ** throbber filename is: %s", ret);391 g_message (" ** throbber filename is: %s", ret);
392392
393 return ret;393 return ret;
394}394}
@@ -405,18 +405,18 @@
405405
406 if (logo_image != NULL)406 if (logo_image != NULL)
407 {407 {
408 g_debug ("get_logo_filename(): user provided a logo on the command line; using that");408 g_message ("get_logo_filename(): user provided a logo on the command line; using that");
409409
410 return g_strdup (logo_image);410 return g_strdup (logo_image);
411 }411 }
412412
413 g_debug ("get_logo_filename(): looking for the best logo for screen width...");413 g_message ("get_logo_filename(): looking for the best logo for screen width...");
414414
415 ret = g_strdup_printf (DATADIR "/images/xsplash/logo_%s.png",415 ret = g_strdup_printf (DATADIR "/images/xsplash/logo_%s.png",
416 get_filename_size_modifier (width));416 get_filename_size_modifier (width));
417417
418 g_debug (" ** Chose `%s'", get_filename_size_modifier (width));418 g_message (" ** Chose `%s'", get_filename_size_modifier (width));
419 g_debug (" ** logo filename is: %s", ret);419 g_message (" ** logo filename is: %s", ret);
420420
421 return ret;421 return ret;
422}422}
@@ -578,7 +578,7 @@
578 }578 }
579 else579 else
580 {580 {
581 g_debug ("couldn't load throbber image from file (%s); "581 g_message ("couldn't load throbber image from file (%s); "
582 "disabling throbber", throbber_image);582 "disabling throbber", throbber_image);
583 }583 }
584 }584 }
@@ -648,7 +648,7 @@
648648
649 gty_timeline_start (timeline);649 gty_timeline_start (timeline);
650650
651 g_debug ("throbber started (%d frames)", throbber_frames);651 g_message ("throbber started (%d frames)", throbber_frames);
652}652}
653653
654static void654static void
@@ -696,7 +696,7 @@
696 switch (event->keyval)696 switch (event->keyval)
697 {697 {
698 case GDK_Escape:698 case GDK_Escape:
699 g_debug ("ESC interrupt");699 g_message ("ESC interrupt");
700 begin_fade (server, TRUE);700 begin_fade (server, TRUE);
701701
702 /* else queue another fade? */702 /* else queue another fade? */
@@ -761,7 +761,7 @@
761761
762 anim_context_free (context);762 anim_context_free (context);
763763
764 g_debug ("fade finished");764 g_message ("fade finished");
765765
766 if (context->exit_on_finish)766 if (context->exit_on_finish)
767 {767 {
@@ -798,7 +798,7 @@
798{798{
799 XsplashServer *server = (XsplashServer *)user_data;799 XsplashServer *server = (XsplashServer *)user_data;
800800
801 g_debug ("** timeout **");801 g_message ("** timeout **");
802802
803 begin_fade (server, TRUE);803 begin_fade (server, TRUE);
804804
@@ -813,13 +813,13 @@
813 if ((strcmp (name, ".") == 0) || strcmp (name, "..") == 0)813 if ((strcmp (name, ".") == 0) || strcmp (name, "..") == 0)
814 return;814 return;
815815
816 g_debug ("adding signal `%s'", name);816 g_message ("adding signal `%s'", name);
817817
818 for (tmp = signal_list; tmp != NULL; tmp = g_slist_next (signal_list))818 for (tmp = signal_list; tmp != NULL; tmp = g_slist_next (signal_list))
819 {819 {
820 if (strcmp (tmp->data, name) == 0)820 if (strcmp (tmp->data, name) == 0)
821 {821 {
822 g_debug (" ** that signal is already being listened for; skipping");822 g_message (" ** that signal is already being listened for; skipping");
823 return;823 return;
824 }824 }
825 }825 }
@@ -841,7 +841,7 @@
841void841void
842sig_handler (int signum)842sig_handler (int signum)
843{843{
844 g_debug ("** interrupted **");844 g_message ("** interrupted **");
845 gtk_main_quit ();845 gtk_main_quit ();
846}846}
847847
@@ -919,9 +919,9 @@
919 if (throbber_image == NULL)919 if (throbber_image == NULL)
920 throbber_image = get_throbber_filename ();920 throbber_image = get_throbber_filename ();
921921
922 g_debug ("background_image = %s", background_image);922 g_message ("background_image = %s", background_image);
923 g_debug ("logo_image = %s", logo_image);923 g_message ("logo_image = %s", logo_image);
924 g_debug ("throbber_image = %s", throbber_image);924 g_message ("throbber_image = %s", throbber_image);
925925
926 system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);926 system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
927927
@@ -956,7 +956,7 @@
956956
957 gtk_main ();957 gtk_main ();
958958
959 g_debug ("exiting...");959 g_message ("exiting...");
960960
961 if (background_image != NULL)961 if (background_image != NULL)
962 g_free (background_image);962 g_free (background_image);
@@ -982,7 +982,7 @@
982 gchar *waitfor,982 gchar *waitfor,
983 GError **error)983 GError **error)
984{984{
985 g_debug ("received a new signal to wait for: %s", waitfor);985 g_message ("received a new signal to wait for: %s", waitfor);
986986
987 if (waitfor)987 if (waitfor)
988 {988 {
@@ -997,11 +997,11 @@
997 gchar *app,997 gchar *app,
998 GError **error)998 GError **error)
999{999{
1000 g_debug ("received signal: %s", app);1000 g_message ("received signal: %s", app);
10011001
1002 if (gdm_session)1002 if (gdm_session)
1003 {1003 {
1004 g_debug ("gdm mode: fading out");1004 g_message ("gdm mode: fading out");
1005 begin_fade (server, TRUE);1005 begin_fade (server, TRUE);
1006 }1006 }
1007 else1007 else
@@ -1013,7 +1013,7 @@
1013 {1013 {
1014 if (strcmp (app, (gchar *)l->data) == 0)1014 if (strcmp (app, (gchar *)l->data) == 0)
1015 {1015 {
1016 g_debug ("received signal %s", (gchar*)l->data);1016 g_message ("received signal %s", (gchar*)l->data);
10171017
1018 g_free (l->data);1018 g_free (l->data);
1019 signal_list = g_slist_delete_link (signal_list, l);1019 signal_list = g_slist_delete_link (signal_list, l);

Subscribers

People subscribed via source and target branches