Hello community, here is the log from the commit of package nemo for openSUSE:Factory checked in at 2017-12-29 18:50:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nemo (Old) and /work/SRC/openSUSE:Factory/.nemo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nemo" Fri Dec 29 18:50:18 2017 rev:22 rq:559723 version:3.6.5 Changes: -------- --- /work/SRC/openSUSE:Factory/nemo/nemo.changes 2017-11-21 15:35:35.282217894 +0100 +++ /work/SRC/openSUSE:Factory/.nemo.new/nemo.changes 2017-12-29 18:50:26.161056963 +0100 @@ -1,0 +2,12 @@ +Sun Dec 24 10:19:44 UTC 2017 - [email protected] + +- Update to version 3.6.5: + * nemo-desktop-manager.c: Add null checks for GErrors - it seems + as though g_dbus calls are not guaranteed to fill the error + slot. + * nemo-window: Restore inadvertantly removed menu actions for + view type selection (and their corresponding shortcuts), using + methods and practices more consistent with currently maintained + code. + +------------------------------------------------------------------- Old: ---- nemo-3.6.4.tar.gz New: ---- nemo-3.6.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nemo.spec ++++++ --- /var/tmp/diff_new_pack.EqMlCI/_old 2017-12-29 18:50:26.796874352 +0100 +++ /var/tmp/diff_new_pack.EqMlCI/_new 2017-12-29 18:50:26.800873204 +0100 @@ -20,7 +20,7 @@ %define sover 1 %define typelib typelib-1_0-Nemo-3_0 Name: nemo -Version: 3.6.4 +Version: 3.6.5 Release: 0 Summary: File browser for Cinnamon License: GPL-2.0+ ++++++ nemo-3.6.4.tar.gz -> nemo-3.6.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/configure.ac new/nemo-3.6.5/configure.ac --- old/nemo-3.6.4/configure.ac 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/configure.ac 2017-12-18 13:38:36.000000000 +0100 @@ -19,7 +19,7 @@ m4_define(nemo_extension_current, 5) m4_define(nemo_extension_revision, 0) -AC_INIT(nemo, 3.6.4, https://github.com/linuxmint/nemo) +AC_INIT(nemo, 3.6.5, https://github.com/linuxmint/nemo) dnl =========================================================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/debian/changelog new/nemo-3.6.5/debian/changelog --- old/nemo-3.6.4/debian/changelog 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/debian/changelog 2017-12-18 13:38:36.000000000 +0100 @@ -1,3 +1,12 @@ +nemo (3.6.5) sylvia; urgency=medium + + [ Michael Webster ] + * nemo-desktop-manager.c: Add null checks for GErrors - it seems as though g_dbus calls are not guaranteed to fill the error slot (which seems like a Gio bug to me, but there's no reason to crash here regardless because of a null error.) + * nemo-window - Restore inadvertantly removed menu actions for view type selection (and their corresponding shortcuts,) using methods and practices more consistent with currently maintained code. + * nemo-window-menus.c: Add a couple guards for the previous commit's view actions for when the window is a NemoDesktopWindow + + -- Clement Lefebvre <[email protected]> Mon, 18 Dec 2017 12:37:52 +0000 + nemo (3.6.4) sylvia; urgency=medium [ Michael Webster ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/src/nemo-desktop-manager.c new/nemo-3.6.5/src/nemo-desktop-manager.c --- old/nemo-3.6.4/src/nemo-desktop-manager.c 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/src/nemo-desktop-manager.c 2017-12-18 13:38:36.000000000 +0100 @@ -131,8 +131,10 @@ NULL, &error)) { - DEBUG ("Attempting proxy call 'GetRunState' failed, resorting to fallback mode: %s", error->message); - g_error_free (error); + DEBUG ("Attempting proxy call 'GetRunState' failed, resorting to fallback mode: %s", + error ? error->message : NULL); + + g_clear_error (&error); ret = RUN_STATE_FALLBACK; goto out; @@ -167,8 +169,11 @@ &monitors, NULL, &error)) { - DEBUG ("Attempting proxy call 'GetMonitors' failed, retrieving n_monitors via GdkScreen: %s", error->message); - g_error_free (error); + + DEBUG ("Attempting proxy call 'GetMonitors' failed, retrieving n_monitors via GdkScreen: %s", + error ? error->message : NULL); + + g_clear_error (&error); n_monitors = nemo_desktop_utils_get_num_monitors (); @@ -227,7 +232,11 @@ &out_rect_var, NULL, &error)) { - DEBUG ("Attempting proxy call 'GetMonitorWorkRect' failed, retrieving n_monitors via GdkScreen: %s", error->message); + + DEBUG ("Attempting proxy call 'GetMonitorWorkRect' failed, retrieving n_monitors via GdkScreen: %s", + error ? error->message : NULL); + + g_clear_error (&error); nemo_desktop_utils_get_monitor_geometry (monitor, &out_rect); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/src/nemo-shell-ui.xml new/nemo-3.6.5/src/nemo-shell-ui.xml --- old/nemo-3.6.4/src/nemo-shell-ui.xml 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/src/nemo-shell-ui.xml 2017-12-18 13:38:36.000000000 +0100 @@ -82,10 +82,10 @@ <menuitem name="Zoom Normal" action="Zoom Normal"/> </placeholder> <placeholder name="View Choices"> - <separator/> - <placeholder name="Extra Viewer"/> - <separator name="Before Short List"/> - <placeholder name="Short List"/> + <separator/> + <menuitem name="Icon View" action="IconView"/> + <menuitem name="List View" action="ListView"/> + <menuitem name="Compact View" action="CompactView"/> </placeholder> </menu> <placeholder name="Other Menus"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/src/nemo-window-menus.c new/nemo-3.6.5/src/nemo-window-menus.c --- old/nemo-3.6.4/src/nemo-window-menus.c 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/src/nemo-window-menus.c 2017-12-18 13:38:36.000000000 +0100 @@ -73,6 +73,18 @@ #define NETWORK_URI "network:" #define COMPUTER_URI "computer:" +static void set_content_view_type(NemoWindow *window, + const gchar *view_id); + +enum { + NULL_VIEW, + ICON_VIEW, + LIST_VIEW, + COMPACT_VIEW, + SIDEBAR_PLACES, + SIDEBAR_TREE +}; + static void action_close_window_slot_callback (GtkAction *action, gpointer user_data) @@ -469,11 +481,6 @@ #define MENU_ITEM_MAX_WIDTH_CHARS 32 -enum { - SIDEBAR_PLACES, - SIDEBAR_TREE -}; - static void action_close_all_windows_callback (GtkAction *action, gpointer user_data) @@ -623,10 +630,46 @@ current_value = gtk_radio_action_get_current_value (current); - if (current_value == SIDEBAR_PLACES) { - nemo_window_set_sidebar_id (window, NEMO_WINDOW_SIDEBAR_PLACES); - } else if (current_value == SIDEBAR_TREE) { - nemo_window_set_sidebar_id (window, NEMO_WINDOW_SIDEBAR_TREE); + switch (current_value) { + case SIDEBAR_PLACES: + nemo_window_set_sidebar_id (window, NEMO_WINDOW_SIDEBAR_PLACES); + break; + case SIDEBAR_TREE: + nemo_window_set_sidebar_id (window, NEMO_WINDOW_SIDEBAR_TREE); + break; + default: + ; + break; + } +} + +static void +view_radio_entry_changed_cb (GtkAction *action, + GtkRadioAction *current, + gpointer user_data) +{ + gint current_value; + NemoWindow *window = NEMO_WINDOW (user_data); + + if (NEMO_IS_DESKTOP_WINDOW (window)) { + return; + } + + current_value = gtk_radio_action_get_current_value (current); + + switch (current_value) { + case ICON_VIEW: + set_content_view_type (window, NEMO_ICON_VIEW_ID); + break; + case LIST_VIEW: + set_content_view_type (window, NEMO_LIST_VIEW_ID); + break; + case COMPACT_VIEW: + set_content_view_type (window, FM_COMPACT_VIEW_ID); + break; + default: + ; + break; } } @@ -867,22 +910,25 @@ toggle_location_entry_setting(window, pane, TRUE); } -enum { - ICON_VIEW, - LIST_VIEW, - COMPACT_VIEW, - NULL_VIEW -}; +static void +set_content_view_type(NemoWindow *window, + const gchar *view_id) +{ + NemoWindowSlot *slot; + + slot = nemo_window_get_active_slot (window); + nemo_window_slot_set_content_view (slot, view_id); +} static void action_icon_view_callback (GtkAction *action, gpointer user_data) { NemoWindow *window; - NemoWindowSlot *slot; + window = NEMO_WINDOW (user_data); - slot = nemo_window_get_active_slot (window); - nemo_window_slot_set_content_view (slot, NEMO_ICON_VIEW_ID); + + set_content_view_type (window, NEMO_ICON_VIEW_ID); toolbar_set_view_button (ICON_VIEW, nemo_window_get_active_pane(window)); } @@ -892,10 +938,10 @@ gpointer user_data) { NemoWindow *window; - NemoWindowSlot *slot; + window = NEMO_WINDOW (user_data); - slot = nemo_window_get_active_slot (window); - nemo_window_slot_set_content_view (slot, NEMO_LIST_VIEW_ID); + + set_content_view_type (window, NEMO_LIST_VIEW_ID); toolbar_set_view_button (LIST_VIEW, nemo_window_get_active_pane(window)); } @@ -905,15 +951,15 @@ gpointer user_data) { NemoWindow *window; - NemoWindowSlot *slot; + window = NEMO_WINDOW (user_data); - slot = nemo_window_get_active_slot (window); - nemo_window_slot_set_content_view (slot, FM_COMPACT_VIEW_ID); + + set_content_view_type (window, FM_COMPACT_VIEW_ID); toolbar_set_view_button (COMPACT_VIEW, nemo_window_get_active_pane(window)); } guint -toolbar_action_for_view_id (const char *view_id) +action_for_view_id (const char *view_id) { if (g_strcmp0(view_id, NEMO_ICON_VIEW_ID) == 0) { return ICON_VIEW; @@ -1007,6 +1053,30 @@ } +void +menu_set_view_selection (guint action_id, + NemoWindow *window) +{ + GtkAction *action; + + if (action_id == NULL_VIEW) { + return; + } + + g_signal_handlers_block_by_func (window->details->main_action_group, + view_radio_entry_changed_cb, + window); + + action = gtk_action_group_get_action (window->details->main_action_group, + NEMO_ACTION_ICON_VIEW); + + gtk_radio_action_set_current_value (GTK_RADIO_ACTION (action), action_id); + + g_signal_handlers_unblock_by_func (window->details->main_action_group, + view_radio_entry_changed_cb, + window); +} + static void action_tabs_previous_callback (GtkAction *action, gpointer user_data) @@ -1312,7 +1382,7 @@ /* is_active */ FALSE }, }; -static const GtkRadioActionEntry main_radio_entries[] = { +static const GtkRadioActionEntry sidebar_radio_entries[] = { { "Sidebar Places", NULL, N_("Places"), NULL, N_("Select Places as the default sidebar"), SIDEBAR_PLACES }, @@ -1321,6 +1391,18 @@ SIDEBAR_TREE } }; +static const GtkRadioActionEntry view_radio_entries[] = { + { "IconView", NULL, + N_("Icon View"), "<ctrl>1", N_("Icon View"), + ICON_VIEW }, + { "ListView", NULL, + N_("List View"), "<ctrl>2", N_("List View"), + LIST_VIEW }, + { "CompactView", NULL, + N_("Compact View"), "<ctrl>3", N_("CompactView"), + COMPACT_VIEW } +}; + GtkActionGroup * nemo_window_create_toolbar_action_group (NemoWindow *window) { @@ -1605,10 +1687,13 @@ main_toggle_entries, G_N_ELEMENTS (main_toggle_entries), window); gtk_action_group_add_radio_actions (action_group, - main_radio_entries, G_N_ELEMENTS (main_radio_entries), + sidebar_radio_entries, G_N_ELEMENTS (sidebar_radio_entries), 0, G_CALLBACK (sidebar_radio_entry_changed_cb), window); - + gtk_action_group_add_radio_actions (action_group, + view_radio_entries, G_N_ELEMENTS (view_radio_entries), + 0, G_CALLBACK (view_radio_entry_changed_cb), + window); action = gtk_action_group_get_action (action_group, NEMO_ACTION_UP); g_object_set (action, "short_label", _("_Up"), NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/src/nemo-window-menus.h new/nemo-3.6.5/src/nemo-window-menus.h --- old/nemo-3.6.4/src/nemo-window-menus.h 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/src/nemo-window-menus.h 2017-12-18 13:38:36.000000000 +0100 @@ -29,7 +29,8 @@ #include "nemo-window-pane.h" #include <gtk/gtk.h> -guint toolbar_action_for_view_id (const char *view_id ); +guint action_for_view_id (const char *view_id ); void toolbar_set_view_button (guint action_id, NemoWindowPane *pane); - +void menu_set_view_selection (guint action_id, + NemoWindow *window); #endif /* NEMO_WINDOW_PANE_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nemo-3.6.4/src/nemo-window.c new/nemo-3.6.5/src/nemo-window.c --- old/nemo-3.6.4/src/nemo-window.c 2017-11-20 11:10:50.000000000 +0100 +++ new/nemo-3.6.5/src/nemo-window.c 2017-12-18 13:38:36.000000000 +0100 @@ -74,12 +74,6 @@ #include <math.h> #include <sys/time.h> -/* dock items */ - -#define NEMO_MENU_PATH_EXTRA_VIEWER_PLACEHOLDER "/MenuBar/View/View Choices/Extra Viewer" -#define NEMO_MENU_PATH_SHORT_LIST_PLACEHOLDER "/MenuBar/View/View Choices/Short List" -#define NEMO_MENU_PATH_AFTER_SHORT_LIST_SEPARATOR "/MenuBar/View/View Choices/After Short List" - #define MAX_TITLE_LENGTH 180 /* Forward and back buttons on the mouse */ @@ -1156,7 +1150,8 @@ pane = nemo_window_get_active_pane(window); view_id = nemo_window_slot_get_content_view_id (slot); - toolbar_set_view_button (toolbar_action_for_view_id (view_id), pane); + toolbar_set_view_button (action_for_view_id (view_id), pane); + menu_set_view_selection (action_for_view_id (view_id), window); } }
