~ubuntu-branches/ubuntu/oneiric/nautilus/oneiric-updates

« back to all changes in this revision

Viewing changes to src/nautilus-view.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-07-25 11:44:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110725114424-thpvep0hbdv8d4kj
Tags: 1:3.1.3-0ubuntu3
* debian/patches/12_remove_create_launcher_on_desktop.patch:
  - remove the "create launcher" entry from desktop right-click. It's depending
    on a gnome-panel binary, confusing the user when unity is running and
    default upstream sessions don't have even nautilus drawing the icons on
    the desktop. Do the same for other places as well. (LP: #723861)

Show diffs side-by-side

added added

removed removed

Lines of Context:
391
391
 * nautilus_view_get_backing_uri:
392
392
 *
393
393
 * Returns the URI for the target location of new directory, new file, new
394
 
 * link, new launcher, and paste operations.
 
394
 * link and paste operations.
395
395
 */
396
396
 
397
397
char *
2108
2108
}
2109
2109
 
2110
2110
static void
2111
 
action_new_launcher_callback (GtkAction *action,
2112
 
                              gpointer callback_data)
2113
 
{
2114
 
        char *parent_uri;
2115
 
        NautilusView *view;
2116
 
        GtkWindow *window;
2117
 
 
2118
 
        g_assert (NAUTILUS_IS_VIEW (callback_data));
2119
 
 
2120
 
        view = NAUTILUS_VIEW (callback_data);
2121
 
 
2122
 
        parent_uri = nautilus_view_get_backing_uri (view);
2123
 
 
2124
 
        window = nautilus_view_get_containing_window (view);
2125
 
        DEBUG ("Create new launcher in window=%p: %s", window, parent_uri);
2126
 
        nautilus_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (view)),
2127
 
                                                  "gnome-desktop-item-edit",
2128
 
                                                  FALSE,
2129
 
                                                  "--create-new", parent_uri, NULL);
2130
 
 
2131
 
        g_free (parent_uri);
2132
 
}
2133
 
 
2134
 
static void
2135
2111
action_properties_callback (GtkAction *action,
2136
2112
                            gpointer callback_data)
2137
2113
{
6979
6955
  /* label, accelerator */       N_("_Empty Document"), NULL,
6980
6956
  /* tooltip */                  N_("Create a new empty document inside this folder"),
6981
6957
                                 G_CALLBACK (action_new_empty_file_callback) },
6982
 
  /* name, stock id */         { "New Launcher", NULL,
6983
 
  /* label, accelerator */       N_("Create L_auncher..."), NULL,
6984
 
  /* tooltip */                  N_("Create a new launcher"),
6985
 
                                 G_CALLBACK (action_new_launcher_callback) },
6986
6958
  /* name, stock id */         { "Open", NULL,
6987
6959
  /* label, accelerator */       N_("_Open"), "<control>o",
6988
6960
  /* tooltip */                  N_("Open the selected item in this window"),
8599
8571
        real_update_paste_menu (view, selection, selection_count);
8600
8572
 
8601
8573
        disable_command_line = g_settings_get_boolean (gnome_lockdown_preferences, NAUTILUS_PREFERENCES_LOCKDOWN_COMMAND_LINE);
8602
 
        action = gtk_action_group_get_action (view->details->dir_action_group,
8603
 
                                              NAUTILUS_ACTION_NEW_LAUNCHER);
8604
 
        gtk_action_set_visible (action, vfolder_directory && !disable_command_line);
8605
 
        gtk_action_set_sensitive (action, can_create_files);
8606
8574
 
8607
8575
        real_update_menus_volumes (view, selection, selection_count);
8608
8576