[Goodies-commits] r6194 - in xfce4-screenshooter-plugin/trunk: . lib panel-plugin
Jerome Guelfucci
jeromeg at xfce.org
Mon Nov 24 08:54:40 CET 2008
Author: jeromeg
Date: 2008-11-24 07:54:40 +0000 (Mon, 24 Nov 2008)
New Revision: 6194
Modified:
xfce4-screenshooter-plugin/trunk/ChangeLog
xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c
xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c
Log:
* lib/screenshooter-utils.c:
- re-add "none" application, fixes the segfault in the plugin
dialog.
* lib/screenshooter-dialogs.c (screenshooter_dialog_new):
- add a "Application:" label.
- Improve the layout.
- the "Default save location" label should not be bold.
Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-24 00:19:22 UTC (rev 6193)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-24 07:54:40 UTC (rev 6194)
@@ -1,3 +1,13 @@
+2008-11-24 jeromeg
+
+ * lib/screenshooter-utils.c:
+ - re-add "none" application, fixes the segfault in the plugin
+ dialog.
+ * lib/screenshooter-dialogs.c (screenshooter_dialog_new):
+ - add a "Application:" label.
+ - Improve the layout.
+ - the "Default save location" label should not be bold.
+
2008-11-23 jeromeg
* lib/screenshooter-actions.c: fix Open with mode.
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-24 00:19:22 UTC (rev 6193)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-24 07:54:40 UTC (rev 6194)
@@ -398,6 +398,8 @@
GtkWidget *open_with_label, *open_with_alignment;
GtkWidget *open_with_box, *open_with_radio_button;
+ GtkWidget *application_label;
+
GtkListStore *liststore;
GtkWidget *combobox;
GtkCellRenderer *renderer, *renderer_pixbuf;
@@ -428,12 +430,12 @@
gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER);
- gtk_container_set_border_width (GTK_CONTAINER (dlg), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (dlg), 0);
gtk_window_set_icon_name (GTK_WINDOW (dlg), "applets-screenshooter");
/* Create the main box for the dialog */
vbox = gtk_vbox_new (FALSE, 6);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox,
TRUE, TRUE, 0);
@@ -593,7 +595,7 @@
/* Create actions box */
- actions_box = gtk_vbox_new (FALSE, 6);
+ actions_box = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (actions_alignment), actions_box);
gtk_container_set_border_width (GTK_CONTAINER (actions_box), 0);
gtk_widget_show (actions_box);
@@ -606,7 +608,7 @@
gtk_box_pack_start (GTK_BOX (actions_box),
save_radio_button, FALSE,
- FALSE, 0);
+ FALSE, 6);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_radio_button),
(sd->action == SAVE));
@@ -634,14 +636,14 @@
gtk_alignment_set_padding (GTK_ALIGNMENT (save_alignment),
0,
6,
- 12,
+ 24,
0);
gtk_widget_show (save_alignment);
-
+
/* Show save dialog checkbox */
- save_box = gtk_vbox_new (FALSE, 6);
+ save_box = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (save_alignment), save_box);
gtk_container_set_border_width (GTK_CONTAINER (save_box), 0);
gtk_widget_show (save_box);
@@ -659,7 +661,7 @@
g_signal_connect (G_OBJECT (save_checkbox), "toggled",
G_CALLBACK (cb_show_save_dialog_toggled), sd);
-
+
/* Default save location */
save_location_box = gtk_hbox_new (FALSE, 12);
@@ -667,29 +669,28 @@
gtk_widget_show (save_location_box);
- default_save_label = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL (default_save_label),
- _("<span weight=\"bold\" stretch=\"semiexpanded\">Default save location</span>"));
-
- gtk_misc_set_alignment (GTK_MISC (default_save_label), 0, 0);
+ default_save_label = gtk_label_new ("Default save location:");
+
+ gtk_misc_set_alignment (GTK_MISC (default_save_label), 0, 0.5);
gtk_widget_show (default_save_label);
gtk_box_pack_start (GTK_BOX (save_location_box),
default_save_label, FALSE,
FALSE, 0);
-
+
dir_chooser =
gtk_file_chooser_button_new (_("Default save location"),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
- gtk_widget_show (dir_chooser);
-
+
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dir_chooser),
sd->screenshot_dir);
gtk_box_pack_start (GTK_BOX (save_location_box),
dir_chooser, FALSE,
FALSE, 0);
+
+ gtk_widget_show (dir_chooser);
g_signal_connect (G_OBJECT (dir_chooser), "selection-changed",
G_CALLBACK (cb_default_folder), sd);
@@ -706,7 +707,7 @@
gtk_box_pack_start (GTK_BOX (actions_box),
open_with_radio_button, FALSE,
- FALSE, 0);
+ FALSE, 6);
gtk_widget_show (open_with_radio_button);
@@ -726,19 +727,31 @@
gtk_alignment_set_padding (GTK_ALIGNMENT (open_with_alignment),
0,
6,
- 12,
+ 24,
0);
gtk_widget_show (open_with_alignment);
/* Open with box*/
- open_with_box = gtk_vbox_new (FALSE, 6);
+ open_with_box = gtk_hbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (open_with_alignment),
open_with_box);
gtk_container_set_border_width (GTK_CONTAINER (open_with_box), 0);
gtk_widget_show (open_with_box);
+ /* Application label */
+
+ application_label = gtk_label_new ("Application:");
+
+ gtk_misc_set_alignment (GTK_MISC (application_label), 0, 0.5);
+
+ gtk_widget_show (application_label);
+
+ gtk_box_pack_start (GTK_BOX (open_with_box),
+ application_label, FALSE,
+ FALSE, 0);
+
/* Open with combobox */
liststore = gtk_list_store_new (3, GDK_TYPE_PIXBUF,
@@ -784,7 +797,7 @@
gtk_box_pack_start (GTK_BOX (actions_box),
clipboard_radio_button, FALSE,
- FALSE, 0);
+ FALSE, 6);
gtk_widget_show (clipboard_radio_button);
@@ -794,7 +807,7 @@
g_signal_connect (G_OBJECT (clipboard_radio_button), "toggled",
G_CALLBACK (cb_clipboard_toggled),
sd);
-
+
return dlg;
}
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c 2008-11-24 00:19:22 UTC (rev 6193)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c 2008-11-24 07:54:40 UTC (rev 6194)
@@ -242,7 +242,7 @@
gint show_save_dialog = 1;
gchar *screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
#ifdef HAVE_GIO
- gchar *app = NULL;
+ gchar *app = g_strdup ("none");
#endif
if (g_file_test (file, G_FILE_TEST_EXISTS))
@@ -266,7 +266,7 @@
g_free (app);
app =
- g_strdup (xfce_rc_read_entry (rc, "app", NULL));
+ g_strdup (xfce_rc_read_entry (rc, "app", "none"));
#endif
}
@@ -334,21 +334,24 @@
{
if (screenshot_path != NULL)
{
- gchar *command =
- g_strconcat (application, " ", screenshot_path, NULL);
+ if (!g_str_equal (application, "none"))
+ {
+ gchar *command =
+ g_strconcat (application, " ", screenshot_path, NULL);
- GError *error = NULL;
+ GError *error = NULL;
- /* Execute the command and show an error dialog if there was
- * an error. */
- if (!xfce_exec_on_screen (gdk_screen_get_default (), command,
- FALSE, TRUE, &error))
- {
- xfce_err (error->message);
- g_error_free (error);
- }
+ /* Execute the command and show an error dialog if there was
+ * an error. */
+ if (!xfce_exec_on_screen (gdk_screen_get_default (), command,
+ FALSE, TRUE, &error))
+ {
+ xfce_err (error->message);
+ g_error_free (error);
+ }
- g_free (command);
+ g_free (command);
+ }
}
}
#endif
Modified: xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c 2008-11-24 00:19:22 UTC (rev 6193)
+++ xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c 2008-11-24 07:54:40 UTC (rev 6194)
@@ -246,13 +246,13 @@
GtkWidget *dlg;
dlg = screenshooter_dialog_new (pd->sd, TRUE);
-
+
/* Block the menu to prevent the user from launching several dialogs at
the same time */
xfce_panel_plugin_block_menu (plugin);
g_object_set_data (G_OBJECT (plugin), "dialog", dlg);
-
+
g_signal_connect (dlg, "response", G_CALLBACK (cb_dialog_response),
pd);
More information about the Goodies-commits
mailing list