Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nemo Patched ! #3

Merged
merged 9 commits into from
Aug 11, 2012
7 changes: 7 additions & 0 deletions libnemo-private/nemo-global-preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ typedef enum
#define NEMO_PREFERENCES_NEW_TAB_POSITION "tabs-open-position"

#define NEMO_PREFERENCES_SHOW_LOCATION_ENTRY "show-location-entry"
#define NEMO_PREFERENCES_SHOW_UP_ICON_TOOLBAR "show-up-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_EDIT_ICON_TOOLBAR "show-edit-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_RELOAD_ICON_TOOLBAR "show-reload-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_HOME_ICON_TOOLBAR "show-home-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_COMPUTER_ICON_TOOLBAR "show-computer-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_SEARCH_ICON_TOOLBAR "show-search-icon-toolbar"
#define NEMO_PREFERENCES_SHOW_LABEL_SEARCH_ICON_TOOLBAR "show-label-search-icon-toolbar"

/* Which views should be displayed for new windows */
#define NEMO_WINDOW_STATE_START_WITH_STATUS_BAR "start-with-status-bar"
Expand Down
2 changes: 1 addition & 1 deletion libnemo-private/nemo-icon-names.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* Icons for places */
#define NEMO_ICON_COMPUTER "computer"
#define NEMO_ICON_DESKTOP "user-desktop"
#define NEMO_ICON_FILESYSTEM "drive-harddisk-system"
#define NEMO_ICON_FILESYSTEM "drive-harddisk"
#define NEMO_ICON_FOLDER "folder"
#define NEMO_ICON_FOLDER_REMOTE "folder-remote"
#define NEMO_ICON_HOME "user-home"
Expand Down
7 changes: 7 additions & 0 deletions libnemo-private/nemo.convert
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
tabs-open-position = /desktop/gnome/file_views/tabs_open_position
always-use-browser = /apps/nemo/preferences/always_use_browser
always-use-location-entry = /apps/nemo/preferences/always_use_location_entry
show-up-icon-toolbar = /apps/nemo/preferences/show-up-icon-toolbar
show-edit-icon-toolbar = /apps/nemo/preferences/show-edit-icon-toolbar
show-reload-icon-toolbar = /apps/nemo/preferences/show-reload-icon-toolbar
show-home-icon-toolbar = /apps/nemo/preferences/show-home-icon-toolbar
show-computer-icon-toolbar = /apps/nemo/preferences/show-computer-icon-toolbar
show-search-icon-toolbar = /apps/nemo/preferences/show-search-icon-toolbar
show-label-search-icon-toolbar = /apps/nemo/preferences/show-label-search-icon-toolbar
confirm-trash = /apps/nemo/preferences/confirm_trash
enable-delete = /apps/nemo/preferences/enable_delete
show-icon-text = /apps/nemo/preferences/show_icon_text
Expand Down
35 changes: 35 additions & 0 deletions libnemo-private/org.gnome.nemo.gschema.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,41 @@
<_summary>Show the location entry by default</_summary>
<_description>If set to true, then Nemo browser windows will show a textual input entry for the location toolbar.</_description>
</key>
<key type="b" name="show-up-icon-toolbar">
<default>false</default>
<summary>Show Up button in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-reload-icon-toolbar">
<default>false</default>
<summary>Show refresh button in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-edit-icon-toolbar">
<default>false</default>
<summary>Show toggle button location entry/pathbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-home-icon-toolbar">
<default>false</default>
<summary>Show Home button in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-computer-icon-toolbar">
<default>false</default>
<summary>Show Computer button in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-search-icon-toolbar">
<default>true</default>
<summary>Show Search button in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the button.</description>
</key>
<key type="b" name="show-label-search-icon-toolbar">
<default>true</default>
<summary>Show the Search button label in nemo toolbar</summary>
<description>If set to true, then Nemo browser windows will show the Search label button.</description>
</key>
<key name="confirm-trash" type="b">
<default>true</default>
<_summary>Whether to ask for confirmation when deleting files, or emptying Trash</_summary>
Expand Down
4 changes: 4 additions & 0 deletions src/nemo-actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define NEMO_ACTION_STOP "Stop"
#define NEMO_ACTION_RELOAD "Reload"
#define NEMO_ACTION_BACK "Back"
#define NEMO_ACTION_COMPUTER "Computer"
#define NEMO_ACTION_UP "Up"
#define NEMO_ACTION_UP_ACCEL "UpAccel"
#define NEMO_ACTION_UP_ACCEL "UpAccel"
Expand All @@ -44,6 +45,7 @@
#define NEMO_ACTION_GO_HOME "Home"
#define NEMO_ACTION_ADD_BOOKMARK "Add Bookmark"
#define NEMO_ACTION_EDIT_BOOKMARKS "Edit Bookmarks"
#define NEMO_ACTION_EDIT "Edit"
#define NEMO_ACTION_HOME "Home"
#define NEMO_ACTION_ZOOM_IN "Zoom In"
#define NEMO_ACTION_ZOOM_OUT "Zoom Out"
Expand Down Expand Up @@ -115,6 +117,8 @@
#define NEMO_ACTION_LOCATION_STOP_VOLUME "Location Stop Volume"
#define NEMO_ACTION_LOCATION_POLL "Location Poll"
#define NEMO_ACTION_SCRIPTS "Scripts"
#define NEMO_ACTION_NEW_LAUNCHER "New Launcher"
#define NEMO_ACTION_NEW_LAUNCHER_DESKTOP "New Launcher"
#define NEMO_ACTION_NEW_DOCUMENTS "New Documents"
#define NEMO_ACTION_NEW_EMPTY_DOCUMENT "New Empty Document"
#define NEMO_ACTION_EMPTY_TRASH_CONDITIONAL "Empty Trash Conditional"
Expand Down
1 change: 1 addition & 0 deletions src/nemo-desktop-icon-view-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<placeholder name="New Window Items">
</placeholder>
<placeholder name="New Object Items">
<menuitem name="New Launcher" action="New Launcher Desktop"/>
</placeholder>
</placeholder>
<placeholder name="After Zoom Items">
Expand Down
31 changes: 31 additions & 0 deletions src/nemo-desktop-icon-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,23 @@ action_empty_trash_conditional_callback (GtkAction *action,
nemo_file_operations_empty_trash (GTK_WIDGET (data));
}

static void
action_new_launcher_callback (GtkAction *action, gpointer data)
{
char *desktop_directory;

g_assert (NEMO_IS_VIEW (data));

desktop_directory = nemo_get_desktop_directory ();

nemo_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)),
"gnome-desktop-item-edit",
FALSE,
"--create-new", desktop_directory, NULL);
g_free (desktop_directory);

}

static gboolean
trash_link_is_selection (NemoView *view)
{
Expand Down Expand Up @@ -709,6 +726,13 @@ real_update_menus (NemoView *view)

desktop_view = NEMO_DESKTOP_ICON_VIEW (view);


/* New Launcher */
action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
NEMO_ACTION_NEW_LAUNCHER_DESKTOP);
gtk_action_set_visible (action,
TRUE);

/* Empty Trash */
include_empty_trash = trash_link_is_selection (view);
action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
Expand All @@ -726,6 +750,13 @@ real_update_menus (NemoView *view)

static const GtkActionEntry desktop_view_entries[] = {
/* name, stock id */
{ "New Launcher Desktop", NULL,
/* label, accelerator */
N_("Create L_auncher..."), NULL,
/* tooltip */
N_("Create a new launcher"),
G_CALLBACK (action_new_launcher_callback) },
/* name, stock id */
{ "Change Background", NULL,
/* label, accelerator */
N_("Change Desktop _Background"), NULL,
Expand Down
1 change: 1 addition & 0 deletions src/nemo-directory-view-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<placeholder name="Before Zoom Items">
<placeholder name="New Object Items">
<menuitem name="New Folder" action="New Folder"/>
<menuitem name="New Launcher" action="New Launcher"/>
<menu action="New Documents">
<menuitem name="No Templates" action="No Templates"/>
<placeholder name="New Documents Placeholder"/>
Expand Down
33 changes: 33 additions & 0 deletions src/nemo-file-management-properties.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_HIDDEN_WIDGET "hidden_files_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_TREE_VIEW_FOLDERS_WIDGET "treeview_folders_checkbutton"

#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_UP_ICON_TOOLBAR_WIDGET "show_up_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_RELOAD_ICON_TOOLBAR_WIDGET "show_reload_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_EDIT_ICON_TOOLBAR_WIDGET "show_edit_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_HOME_ICON_TOOLBAR_WIDGET "show_home_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_COMPUTER_ICON_TOOLBAR_WIDGET "show_computer_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_SEARCH_ICON_TOOLBAR_WIDGET "show_search_icon_toolbar_checkbutton"
#define NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_LABEL_SEARCH_ICON_TOOLBAR_WIDGET "show_label_search_icon_toolbar_checkbutton"


/* int enums */
#define NEMO_FILE_MANAGEMENT_PROPERTIES_THUMBNAIL_LIMIT_WIDGET "preview_image_size_combobox"

Expand Down Expand Up @@ -721,6 +730,30 @@ nemo_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi
4);
create_date_format_menu (builder);


/* nemo patch */
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_UP_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_UP_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_RELOAD_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_RELOAD_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_EDIT_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_EDIT_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_HOME_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_HOME_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_COMPUTER_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_COMPUTER_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_SEARCH_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_SEARCH_ICON_TOOLBAR);
bind_builder_bool (builder, nemo_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_SHOW_LABEL_SEARCH_ICON_TOOLBAR_WIDGET,
NEMO_PREFERENCES_SHOW_LABEL_SEARCH_ICON_TOOLBAR);

/* setup preferences */
bind_builder_bool (builder, nemo_icon_view_preferences,
NEMO_FILE_MANAGEMENT_PROPERTIES_LABELS_BESIDE_ICONS_WIDGET,
Expand Down
Loading