[Goodies-commits] r6753 - in xfce4-screenshooter/trunk: lib panel-plugin
Jerome Guelfucci
jeromeg at xfce.org
Sun Feb 22 17:16:43 CET 2009
Author: jeromeg
Date: 2009-02-22 16:16:43 +0000 (Sun, 22 Feb 2009)
New Revision: 6753
Modified:
xfce4-screenshooter/trunk/lib/screenshooter-utils.c
xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
Log:
Use TRACE instead of DBG
Modified: xfce4-screenshooter/trunk/lib/screenshooter-utils.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-utils.c 2009-02-22 13:02:45 UTC (rev 6752)
+++ xfce4-screenshooter/trunk/lib/screenshooter-utils.c 2009-02-22 16:16:43 UTC (rev 6753)
@@ -40,14 +40,14 @@
{
GdkWindow *window, *window2;
- DBG ("Get the active window");
+ TRACE ("Get the active window");
window = gdk_screen_get_active_window (screen);
/* If there is no active window, we fallback to the whole screen. */
if (window == NULL)
{
- DBG ("No active window, fallback to the root window");
+ TRACE ("No active window, fallback to the root window");
window = gdk_get_default_root_window ();
*needs_unref = FALSE;
@@ -55,7 +55,7 @@
else if (gdk_window_get_type_hint (window) == GDK_WINDOW_TYPE_HINT_DESKTOP)
{
/* If the active window is the desktop, grab the whole screen */
- DBG ("The active window is the desktop, fallback to the root window");
+ TRACE ("The active window is the desktop, fallback to the root window");
g_object_unref (window);
@@ -65,7 +65,7 @@
else
{
/* Else we find the toplevel window to grab the decorations. */
- DBG ("Active window is a normal window, grab the toplevel window");
+ TRACE ("Active window is a normal window, grab the toplevel window");
window2 = gdk_window_get_toplevel (window);
@@ -89,17 +89,17 @@
GdkRectangle *rectangle = g_new0 (GdkRectangle, 1);
/* Get the root window */
- DBG ("Get the root window");
+ TRACE ("Get the root window");
root = gdk_get_default_root_window ();
- DBG ("Get the frame extents");
+ TRACE ("Get the frame extents");
gdk_window_get_frame_extents (window, rectangle);
/* Don't grab thing offscreen. */
- DBG ("Make sure we don't grab things offscreen");
+ TRACE ("Make sure we don't grab things offscreen");
x_orig = rectangle->x;
y_orig = rectangle->y;
@@ -129,7 +129,7 @@
/* Take the screenshot from the root GdkWindow, to grab things such as
* menus. */
- DBG ("Grab the screenshot");
+ TRACE ("Grab the screenshot");
screenshot = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
x_orig, y_orig, 0, 0,
@@ -146,7 +146,7 @@
GdkPixbuf *screenshot = NULL;
/* Get root window */
- DBG ("Get the root window");
+ TRACE ("Get the root window");
GdkWindow *root_window = gdk_get_default_root_window ();
@@ -174,7 +174,7 @@
/*Set up graphics context for a XOR rectangle that will be drawn as
* the user drags the mouse */
- DBG ("Initialize the graphics context");
+ TRACE ("Initialize the graphics context");
gc_values.function = GDK_XOR;
gc_values.line_width = 0;
@@ -193,7 +193,7 @@
gdk_gc_set_rgb_bg_color (gc, &gc_black);
/* Change cursor to cross-hair */
- DBG ("Set the cursor");
+ TRACE ("Set the cursor");
grabstatus = gdk_pointer_grab (root_window, FALSE, mask,
NULL, xhair_cursor, GDK_CURRENT_TIME);
@@ -214,7 +214,7 @@
case GDK_BUTTON_PRESS:
- DBG ("Start dragging the rectangle");
+ TRACE ("Start dragging the rectangle");
x = x2 = x1 = event->button.x;
y = y2 = y1 = event->button.y;
@@ -230,7 +230,7 @@
{
/* Remove the rectangle drawn previously */
- DBG ("Remove the rectangle drawn previously");
+ TRACE ("Remove the rectangle drawn previously");
gdk_draw_rectangle (root_window,
gc,
@@ -242,7 +242,7 @@
{
/* The user has not dragged the mouse, start again */
- DBG ("Mouse was not dragged, start agan");
+ TRACE ("Mouse was not dragged, start agan");
pressed = FALSE;
}
@@ -253,13 +253,13 @@
case GDK_MOTION_NOTIFY:
if (pressed)
{
- DBG ("Mouse is moving");
+ TRACE ("Mouse is moving");
if (w > 0 && h > 0)
/* Remove the rectangle drawn previously */
- DBG ("Remove the rectangle drawn previously");
+ TRACE ("Remove the rectangle drawn previously");
gdk_draw_rectangle (root_window,
gc,
@@ -276,7 +276,7 @@
/* Draw the rectangle as the user drags the mouse */
- DBG ("Draw the new rectangle");
+ TRACE ("Draw the new rectangle");
if (w > 0 && h > 0)
gdk_draw_rectangle (root_window,
@@ -296,14 +296,14 @@
if (grabstatus == GDK_GRAB_SUCCESS)
{
- DBG ("Ungrab the pointer");
+ TRACE ("Ungrab the pointer");
gdk_pointer_ungrab(GDK_CURRENT_TIME);
}
/* Get the screenshot's pixbuf */
- DBG ("Get the pixbuf for the screenshot");
+ TRACE ("Get the pixbuf for the screenshot");
screenshot = gdk_pixbuf_get_from_drawable (NULL, root_window, NULL,
x, y, 0, 0, w, h);
@@ -412,13 +412,13 @@
if (file != NULL)
{
- DBG ("Open the rc file");
+ TRACE ("Open the rc file");
rc = xfce_rc_simple_open (file, TRUE);
if (rc != NULL)
{
- DBG ("Read the entries");
+ TRACE ("Read the entries");
delay = xfce_rc_read_int_entry (rc, "delay", 0);
@@ -444,13 +444,13 @@
DEFAULT_SAVE_DIRECTORY));
}
- DBG ("Close the rc file");
+ TRACE ("Close the rc file");
xfce_rc_close (rc);
}
/* And set the sd values */
- DBG ("Set the values of the struct");
+ TRACE ("Set the values of the struct");
sd->delay = delay;
sd->region = region;
Modified: xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-02-22 13:02:45 UTC (rev 6752)
+++ xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-02-22 16:16:43 UTC (rev 6753)
@@ -117,17 +117,17 @@
int width = size - 2 - 2 * MAX (pd->button->style->xthickness,
pd->button->style->ythickness);
- DBG ("Get the icon from the theme");
+ TRACE ("Get the icon from the theme");
pb = xfce_themed_icon_load (SCREENSHOT_ICON_NAME, width);
- DBG ("Set the new icon");
+ TRACE ("Set the new icon");
gtk_image_set_from_pixbuf (GTK_IMAGE (pd->image), pb);
g_object_unref (pb);
- DBG ("Request size for the plugin");
+ TRACE ("Request size for the plugin");
gtk_widget_set_size_request (GTK_WIDGET (plugin), size, size);
@@ -168,7 +168,7 @@
another screenshot is in progress */
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
- DBG ("Start taking the screenshot");
+ TRACE ("Start taking the screenshot");
screenshooter_take_and_output_screenshot (pd->sd);
@@ -286,18 +286,18 @@
{
GtkWidget *dlg;
- DBG ("Create the dialog");
+ TRACE ("Create the dialog");
dlg = screenshooter_dialog_new (pd->sd, TRUE);
/* Block the menu to prevent the user from launching several dialogs at
the same time */
- DBG ("Block the menu");
+ TRACE ("Block the menu");
xfce_panel_plugin_block_menu (plugin);
- DBG ("Run the dialog");
+ TRACE ("Run the dialog");
g_object_set_data (G_OBJECT (plugin), "dialog", dlg);
@@ -319,19 +319,19 @@
pd->sd = sd;
- DBG ("Initialize the text domain");
+ TRACE ("Initialize the text domain");
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
pd->plugin = plugin;
/* Read the options */
- DBG ("Read the preferences file");
+ TRACE ("Read the preferences file");
screenshooter_plugin_read_rc_file (plugin, pd);
/* Create the panel button */
- DBG ("Create the panel button");
+ TRACE ("Create the panel button");
pd->button = xfce_create_panel_button ();
@@ -341,7 +341,7 @@
/* Set the tooltips if available */
#if GTK_CHECK_VERSION(2,12,0)
- DBG ("Set the default tooltip");
+ TRACE ("Set the default tooltip");
if (pd->sd->region == FULLSCREEN)
@@ -363,7 +363,7 @@
}
#endif
- DBG ("Add the button to the panel");
+ TRACE ("Add the button to the panel");
gtk_widget_show_all (pd->button);
@@ -373,28 +373,28 @@
/* Set the callbacks */
- DBG ("Set the clicked callback");
+ TRACE ("Set the clicked callback");
g_signal_connect (pd->button, "clicked",
G_CALLBACK (cb_button_clicked), pd);
- DBG ("Set the free data callback");
+ TRACE ("Set the free data callback");
g_signal_connect (plugin, "free-data",
G_CALLBACK (cb_free_data), pd);
- DBG ("Set the size changed callback");
+ TRACE ("Set the size changed callback");
g_signal_connect (plugin, "size-changed",
G_CALLBACK (cb_set_size), pd);
- DBG ("Set the style set callback");
+ TRACE ("Set the style set callback");
pd->style_id =
g_signal_connect (plugin, "style-set",
G_CALLBACK (cb_style_set), pd);
- DBG ("Set the configuration menu");
+ TRACE ("Set the configuration menu");
xfce_panel_plugin_menu_show_configure (plugin);
More information about the Goodies-commits
mailing list