diff options
| author | zhuyaliang <[email protected]> | 2023-04-14 18:04:04 +0800 | 
|---|---|---|
| committer | Luke from DC <[email protected]> | 2023-04-21 05:17:59 +0000 | 
| commit | bfad1975223ff5da6e998f3ad20fdc52e0fe94ca (patch) | |
| tree | b4ffc85f2e2d602b5391bfaa057ba9afd0148cfd | |
| parent | 9c8ab8787724da4603c023adf406d0d4909bb8de (diff) | |
| download | engrampa-bfad1975223ff5da6e998f3ad20fdc52e0fe94ca.tar.bz2 engrampa-bfad1975223ff5da6e998f3ad20fdc52e0fe94ca.tar.xz | |
action: Delete unused sort_by_entries code
| -rw-r--r-- | src/actions.c | 9 | ||||
| -rw-r--r-- | src/actions.h | 1 | ||||
| -rw-r--r-- | src/fr-window.c | 29 | ||||
| -rw-r--r-- | src/fr-window.h | 3 | ||||
| -rw-r--r-- | src/ui.h | 26 | 
5 files changed, 0 insertions, 68 deletions
| diff --git a/src/actions.c b/src/actions.c index 6b0b25c..5b749a8 100644 --- a/src/actions.c +++ b/src/actions.c @@ -748,15 +748,6 @@ activate_action_reload (GtkAction *action,  }  void -activate_action_sort_reverse_order (GtkAction *action, -                    gpointer   data) -{ -    FrWindow *window = data; - -    fr_window_set_sort_type (window, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)) ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING); -} - -void  activate_action_last_output (GtkAction *action,                   gpointer   data)  { diff --git a/src/actions.h b/src/actions.h index f893503..41ab4b6 100644 --- a/src/actions.h +++ b/src/actions.h @@ -67,7 +67,6 @@ void activate_action_view_statusbar (GtkAction *action, gpointer data);  void activate_action_view_folders (GtkAction *action, gpointer data);  void activate_action_stop (GtkAction *action, gpointer data);  void activate_action_reload (GtkAction *action, gpointer data); -void activate_action_sort_reverse_order (GtkAction *action, gpointer data);  void activate_action_last_output (GtkAction *action, gpointer data);  void activate_action_go_back (GtkAction *action, gpointer data); diff --git a/src/fr-window.c b/src/fr-window.c index 88d8d9a..665670d 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -4854,9 +4854,6 @@ sort_column_changed_cb (GtkTreeSortable *sortable,  	window->priv->sort_method = get_sort_method_from_column (column_id);  	window->priv->sort_type = order; - -	/*set_active (window, get_action_from_sort_method (window->priv->sort_method), TRUE); -	set_active (window, "SortReverseOrder", (window->priv->sort_type == GTK_SORT_DESCENDING));*/  }  static gboolean @@ -5116,18 +5113,6 @@ view_as_radio_action (GtkAction      *action,  }  static void -sort_by_radio_action (GtkAction      *action, -		      GtkRadioAction *current, -		      gpointer        data) -{ -	FrWindow *window = data; - -	window->priv->sort_method = gtk_radio_action_get_current_value (current); -	window->priv->sort_type = GTK_SORT_ASCENDING; -	fr_window_update_list_order (window); -} - -static void  recent_chooser_item_activated_cb (GtkRecentChooser *chooser,  				  FrWindow         *window)  { @@ -5727,12 +5712,6 @@ fr_window_construct (FrWindow *window)  					    window->priv->list_mode,  					    G_CALLBACK (view_as_radio_action),  					    window); -	gtk_action_group_add_radio_actions (actions, -					    sort_by_entries, -					    n_sort_by_entries, -					    window->priv->sort_type, -					    G_CALLBACK (sort_by_radio_action), -					    window);  	g_signal_connect (ui, "connect_proxy",  			  G_CALLBACK (connect_proxy_cb), window); @@ -7024,14 +7003,6 @@ fr_window_unselect_all (FrWindow *window)  }  void -fr_window_set_sort_type (FrWindow     *window, -			 GtkSortType   sort_type) -{ -	window->priv->sort_type = sort_type; -	fr_window_update_list_order (window); -} - -void  fr_window_stop (FrWindow *window)  {  	if (! window->priv->stoppable) diff --git a/src/fr-window.h b/src/fr-window.h index 9b006a9..436dd3c 100644 --- a/src/fr-window.h +++ b/src/fr-window.h @@ -217,9 +217,6 @@ GtkTreeModel *  void       fr_window_find                         (FrWindow    *window);  void       fr_window_select_all                   (FrWindow    *window);  void       fr_window_unselect_all                 (FrWindow    *window); -void       fr_window_set_sort_type                (FrWindow    *window, -						   GtkSortType  sort_type); -  /**/  void       fr_window_rename_selection             (FrWindow    *window, @@ -220,11 +220,6 @@ static GtkToggleActionEntry action_toggle_entries[] = {  	  N_("View the statusbar"),  	  G_CALLBACK (activate_action_view_statusbar),  	  TRUE }, -	{ "SortReverseOrder", NULL, -	  N_("_Reversed Order"), NULL, -	  N_("Reverse the list order"), -	  G_CALLBACK (activate_action_sort_reverse_order), -	  FALSE },  	{ "ViewFolders", NULL,  	  N_("_Folders"), "F9",  	  N_("View the folders pane"), @@ -243,25 +238,4 @@ static GtkRadioActionEntry view_as_entries[] = {  };  static guint n_view_as_entries = G_N_ELEMENTS (view_as_entries); -static GtkRadioActionEntry sort_by_entries[] = { -	{ "SortByName", NULL, -	  N_("by _Name"), NULL, -	  N_("Sort file list by name"), FR_WINDOW_SORT_BY_NAME }, -	{ "SortBySize", NULL, -	  N_("by _Size"), NULL, -	  N_("Sort file list by file size"), FR_WINDOW_SORT_BY_SIZE }, -	{ "SortByType", NULL, -	  N_("by T_ype"), NULL, -	  N_("Sort file list by type"), FR_WINDOW_SORT_BY_TYPE }, -	{ "SortByDate", NULL, -	  N_("by _Date Modified"), NULL, -	  N_("Sort file list by modification time"), FR_WINDOW_SORT_BY_TIME }, -	{ "SortByLocation", NULL, -	  /* Translators: this is the "sort by file location" menu item */ -	  N_("by _Location"), NULL, -	  /* Translators: location is the file location */ -	  N_("Sort file list by location"), FR_WINDOW_SORT_BY_PATH }, -}; -static guint n_sort_by_entries = G_N_ELEMENTS (sort_by_entries); -  #endif /* UI_H */ | 
