[Goodies-commits] r7437 - in xfce4-screenshooter/trunk: . docs/manual/C/images lib panel-plugin po-doc src
Jerome Guelfucci
jeromeg at xfce.org
Fri May 29 14:10:06 CEST 2009
Author: jeromeg
Date: 2009-05-29 12:10:06 +0000 (Fri, 29 May 2009)
New Revision: 7437
Modified:
xfce4-screenshooter/trunk/ChangeLog
xfce4-screenshooter/trunk/TODO
xfce4-screenshooter/trunk/docs/manual/C/images/xfce4-screenshooter-dialog.png
xfce4-screenshooter/trunk/lib/screenshooter-actions.c
xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
xfce4-screenshooter/trunk/po-doc/xfce4-screenshooter.pot
xfce4-screenshooter/trunk/src/main.c
Log:
Fix a crash in the panel plugin.
Use sd->cli and sd->close correctly so that it does not exit the main
loop when running the panel plugin which makes it crash. Simplify the
code a bit and set the members of the structure correctly when
initializing the application and the plugin.
Modified: xfce4-screenshooter/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter/trunk/ChangeLog 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/ChangeLog 2009-05-29 12:10:06 UTC (rev 7437)
@@ -1,3 +1,12 @@
+2009-05-29 jeromeg
+
+Fix a crash in the panel plugin.
+
+Use sd->cli and sd->close correctly so that it does not exit the main
+loop when running the panel plugin which makes it crash. Simplify the
+code a bit and set the members of the structure correctly when
+initializing the application and the plugin.
+
2009-05-28 jeromeg
Add a throbber to notify activity during the ZimageZ upload.
Modified: xfce4-screenshooter/trunk/TODO
===================================================================
--- xfce4-screenshooter/trunk/TODO 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/TODO 2009-05-29 12:10:06 UTC (rev 7437)
@@ -1,14 +1,12 @@
Long term:
-* Port "select a region" to use caiiro to have transparent rubber banding
+* Port "select a region" to use cairo to have transparent rubber banding
as in thunar and xfdesktop.
* Use Xshape to have a transparent background in the generated screenshots.
Before next release:
* the Zimagez code needs a lot of error checking.
-* Fix last user.
-* Add a pulsy progress bar for the zimagez upload.
* Update the documentation.
* Check for leaks.
Modified: xfce4-screenshooter/trunk/docs/manual/C/images/xfce4-screenshooter-dialog.png
===================================================================
(Binary files differ)
Modified: xfce4-screenshooter/trunk/lib/screenshooter-actions.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-actions.c 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/lib/screenshooter-actions.c 2009-05-29 12:10:06 UTC (rev 7437)
@@ -130,8 +130,9 @@
g_object_unref (screenshot);
- if ((sd->cli == TRUE) || (sd->close == 1))
+ if (sd->close == 1)
{
+ TRACE ("Exit the main loop");
gtk_main_quit ();
return FALSE;
}
Modified: xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-05-29 12:10:06 UTC (rev 7437)
@@ -1317,7 +1317,6 @@
}
TRACE ("Free the gchars and unref the GFiles");
-
g_free (filename);
return savename;
Modified: xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-05-29 12:10:06 UTC (rev 7437)
@@ -319,36 +319,33 @@
g_thread_init (NULL);
pd->sd = sd;
- /* The panel plugin ignores the close settings, as in command line */
- pd->sd->cli = TRUE;
+ pd->plugin = plugin;
TRACE ("Initialize the text domain");
-
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
- pd->plugin = plugin;
-
/* Read the options */
TRACE ("Read the preferences file");
-
screenshooter_plugin_read_rc_file (plugin, pd);
+ /* We want to take only one screenshot as in CLI, but not to close the main
+ loop after taking a screenshot */
+ pd->sd->cli = TRUE;
+ pd->sd->close = 0;
+
/* Create the panel button */
TRACE ("Create the panel button");
-
pd->button = xfce_create_panel_button ();
pd->image = gtk_image_new ();
gtk_container_add (GTK_CONTAINER (pd->button), GTK_WIDGET (pd->image));
- /* Set the tooltips if available */
+ /* Set the tooltips */
TRACE ("Set the default tooltip");
-
set_panel_button_tooltip (pd);
TRACE ("Add the button to the panel");
-
gtk_widget_show_all (pd->button);
gtk_container_add (GTK_CONTAINER (plugin), pd->button);
@@ -356,25 +353,19 @@
xfce_panel_plugin_add_action_widget (plugin, pd->button);
/* Set the callbacks */
-
TRACE ("Set the clicked callback");
-
g_signal_connect (pd->button, "clicked", G_CALLBACK (cb_button_clicked), pd);
TRACE ("Set the free data callback");
-
g_signal_connect (plugin, "free-data", G_CALLBACK (cb_free_data), pd);
TRACE ("Set the size changed callback");
-
g_signal_connect (plugin, "size-changed", G_CALLBACK (cb_set_size), pd);
TRACE ("Set the style set callback");
-
pd->style_id = g_signal_connect (plugin, "style-set", G_CALLBACK (cb_style_set), pd);
TRACE ("Set the configuration menu");
-
xfce_panel_plugin_menu_show_configure (plugin);
g_signal_connect (plugin, "configure-plugin", G_CALLBACK (cb_properties_dialog), pd);
Modified: xfce4-screenshooter/trunk/po-doc/xfce4-screenshooter.pot
===================================================================
--- xfce4-screenshooter/trunk/po-doc/xfce4-screenshooter.pot 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/po-doc/xfce4-screenshooter.pot 2009-05-29 12:10:06 UTC (rev 7437)
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2009-02-25 10:44+0100\n"
+"POT-Creation-Date: 2009-05-29 13:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -12,7 +12,7 @@
#. When image changes, this message will be marked fuzzy or untranslated for you.
#. It doesn't matter what you translate it to: it's not used at all.
#: ../docs/manual/C/xfce4-screenshooter.xml.in:83(None)
-msgid "@@image: 'images/xfce4-screenshooter-dialog.png'; md5=eac0b7b57e11329de808246e69e6e7d6"
+msgid "@@image: 'images/xfce4-screenshooter-dialog.png'; md5=a6ca268a2df9d078905853729dfd80c2"
msgstr ""
#: ../docs/manual/C/xfce4-screenshooter.xml.in:12(title)
Modified: xfce4-screenshooter/trunk/src/main.c
===================================================================
--- xfce4-screenshooter/trunk/src/main.c 2009-05-29 10:44:34 UTC (rev 7436)
+++ xfce4-screenshooter/trunk/src/main.c 2009-05-29 12:10:06 UTC (rev 7437)
@@ -174,6 +174,7 @@
if (fullscreen || window || region)
{
sd->cli = TRUE;
+ sd->close = 1;
/* Set the region to be captured */
if (window)
More information about the Goodies-commits
mailing list