cheese r695 - in trunk: . data src
- From: dgsiegel svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r695 - in trunk: . data src
- Date: Sun, 27 Apr 2008 02:20:07 +0100 (BST)
Author: dgsiegel
Date: Sun Apr 27 01:20:07 2008
New Revision: 695
URL: http://svn.gnome.org/viewvc/cheese?rev=695&view=rev
Log:
added support for nautilus send to. this replaces "send by email" where available, fixes bug #528249, courtesy of Jose Dapena Paz
Modified:
trunk/ChangeLog
trunk/data/cheese-ui.xml
trunk/src/cheese-window.c
Modified: trunk/data/cheese-ui.xml
==============================================================================
--- trunk/data/cheese-ui.xml (original)
+++ trunk/data/cheese-ui.xml Sun Apr 27 01:20:07 2008
@@ -32,6 +32,7 @@
<separator/>
<menuitem action="MoveToTrash" />
<separator/>
+ <menuitem action="SendTo" />
<menuitem action="SendByMail" />
<menuitem action="SetAsAccountPhoto" />
<menuitem action="ExportToFSpot" />
Modified: trunk/src/cheese-window.c
==============================================================================
--- trunk/src/cheese-window.c (original)
+++ trunk/src/cheese-window.c Sun Apr 27 01:20:07 2008
@@ -116,6 +116,7 @@
GtkActionGroup *actions_effects;
GtkActionGroup *actions_preferences;
GtkActionGroup *actions_file;
+ GtkActionGroup *actions_sendto;
GtkActionGroup *actions_flickr;
GtkActionGroup *actions_fspot;
GtkActionGroup *actions_mail;
@@ -230,6 +231,7 @@
g_object_unref (cheese_window->actions_countdown);
g_object_unref (cheese_window->actions_effects);
g_object_unref (cheese_window->actions_file);
+ g_object_unref (cheese_window->actions_sendto);
g_object_unref (cheese_window->actions_flickr);
g_object_unref (cheese_window->actions_fspot);
g_object_unref (cheese_window->actions_mail);
@@ -528,6 +530,10 @@
basename, filename);
g_free (basename);
}
+ if (strcmp (action_name, "SendTo") == 0)
+ {
+ command_line = g_strdup_printf ("nautilus-sendto %s", filename);
+ }
else if (strcmp (action_name, "ExportToFSpot") == 0)
{
char *dirname = g_path_get_dirname (filename);
@@ -1005,6 +1011,10 @@
{"SendByMail", NULL, N_("Send by _Mail"), NULL, NULL, G_CALLBACK (cheese_window_cmd_command_line)},
};
+static const GtkActionEntry action_entries_sendto[] = {
+ {"SendTo", NULL, N_("Send _To"), NULL, NULL, G_CALLBACK (cheese_window_cmd_command_line)},
+};
+
static const GtkActionEntry action_entries_fspot[] = {
{"ExportToFSpot", NULL, N_("Export to F-_Spot"), NULL, NULL, G_CALLBACK (cheese_window_cmd_command_line)},
};
@@ -1238,8 +1248,26 @@
"ActionsMail",
action_entries_mail,
G_N_ELEMENTS (action_entries_mail));
- path = g_find_program_in_path ("gnome-open");
- gtk_action_group_set_visible (cheese_window->actions_mail, path != NULL);
+ gboolean send_mail_imp_available = FALSE;
+ cheese_window->actions_sendto = cheese_window_action_group_new (cheese_window,
+ "ActionsSendTo",
+ action_entries_sendto,
+ G_N_ELEMENTS (action_entries_sendto));
+
+ /* handling and activation of send to/send mail actions. We only show one send mail action */
+ path = g_find_program_in_path ("nautilus-sendto");
+ gboolean nautilus_sendto = (path != NULL);
+ if (nautilus_sendto)
+ {
+ gtk_action_group_set_visible (cheese_window->actions_sendto, TRUE);
+ gtk_action_group_set_visible (cheese_window->actions_mail, FALSE);
+ }
+ else
+ {
+ path = g_find_program_in_path ("gnome-open");
+ gtk_action_group_set_visible (cheese_window->actions_mail, path != NULL);
+ gtk_action_group_set_visible (cheese_window->actions_sendto, FALSE);
+ }
g_free (path);
cheese_window->actions_fspot = cheese_window_action_group_new (cheese_window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]