summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-01-06 12:20:45 +0300
committermonsta <[email protected]>2017-01-06 12:20:45 +0300
commit325be72a116c40c83a4803b2ade015352ac556ac (patch)
tree02aca1496bf8cb5ffb1e66112feb8cf41d66a3eb /src
parenta0b0cb68df1450ed735b546e605175a85602d3ae (diff)
downloadcaja-325be72a116c40c83a4803b2ade015352ac556ac.tar.bz2
caja-325be72a116c40c83a4803b2ade015352ac556ac.tar.xz
remove some unused code that's also gone upstream
Diffstat (limited to 'src')
-rw-r--r--src/caja-pathbar.c102
-rw-r--r--src/caja-pathbar.h3
-rw-r--r--src/caja-window-manage-views.c46
3 files changed, 1 insertions, 150 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 322865a5..bafd8e66 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -1337,47 +1337,6 @@ button_clicked_cb (GtkWidget *button,
}
static CajaIconInfo *
-get_custom_user_icon_info (ButtonData *button_data)
-{
- /* Bug 80925: With tiny display sizes we get huge memory allocations. */
-#if 0
- CajaIconInfo *icon_info;
- GFile *icon_file;
- GIcon *icon;
- char *custom_icon_uri;
-
- icon = NULL;
-
- if (button_data->file != NULL)
- {
- custom_icon_uri = caja_file_get_custom_icon (button_data->file);
- if (custom_icon_uri != NULL)
- {
- icon_file = g_file_new_for_uri (custom_icon_uri);
-
- if (g_file_is_native (icon_file))
- {
- icon = g_file_icon_new (icon_file);
- }
-
- g_object_unref (icon_file);
- g_free (custom_icon_uri);
- }
- }
-
- if (icon != NULL)
- {
- icon_info = caja_icon_info_lookup (icon, CAJA_PATH_BAR_ICON_SIZE);
- g_object_unref (icon);
-
- return icon_info;
- }
-#endif
-
- return NULL;
-}
-
-static CajaIconInfo *
get_type_icon_info (ButtonData *button_data)
{
switch (button_data->type)
@@ -1511,12 +1470,7 @@ caja_path_bar_update_button_appearance (ButtonData *button_data)
}
else
{
- icon_info = get_custom_user_icon_info (button_data);
- if (icon_info == NULL)
- {
- icon_info = get_type_icon_info (button_data);
- }
-
+ icon_info = get_type_icon_info (button_data);
pixbuf = NULL;
if (icon_info != NULL)
@@ -2150,60 +2104,6 @@ caja_path_bar_get_path_for_button (CajaPathBar *path_bar,
return NULL;
}
-/**
- * _caja_path_bar_up:
- * @path_bar: a #CajaPathBar
- *
- * If the selected button in the pathbar is not the furthest button "up" (in the
- * root direction), act as if the user clicked on the next button up.
- **/
-void
-caja_path_bar_up (CajaPathBar *path_bar)
-{
- GList *l;
-
- for (l = path_bar->button_list; l; l = l->next)
- {
- GtkWidget *button = BUTTON_DATA (l->data)->button;
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
- {
- if (l->next)
- {
- GtkWidget *next_button = BUTTON_DATA (l->next->data)->button;
- button_clicked_cb (next_button, l->next->data);
- }
- break;
- }
- }
-}
-
-/**
- * _caja_path_bar_down:
- * @path_bar: a #CajaPathBar
- *
- * If the selected button in the pathbar is not the furthest button "down" (in the
- * leaf direction), act as if the user clicked on the next button down.
- **/
-void
-caja_path_bar_down (CajaPathBar *path_bar)
-{
- GList *l;
-
- for (l = path_bar->button_list; l; l = l->next)
- {
- GtkWidget *button = BUTTON_DATA (l->data)->button;
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
- {
- if (l->prev)
- {
- GtkWidget *prev_button = BUTTON_DATA (l->prev->data)->button;
- button_clicked_cb (prev_button, l->prev->data);
- }
- break;
- }
- }
-}
-
GtkWidget *
caja_path_bar_get_button_from_button_list_entry (gpointer entry)
{
diff --git a/src/caja-pathbar.h b/src/caja-pathbar.h
index fc6f684d..7fbcc786 100644
--- a/src/caja-pathbar.h
+++ b/src/caja-pathbar.h
@@ -82,9 +82,6 @@ GFile * caja_path_bar_get_path_for_button (CajaPathBar *path_bar,
GtkWidget *button);
void caja_path_bar_clear_buttons (CajaPathBar *path_bar);
-void caja_path_bar_up (CajaPathBar *path_bar);
-void caja_path_bar_down (CajaPathBar *path_bar);
-
GtkWidget * caja_path_bar_get_button_from_button_list_entry (gpointer entry);
#endif /* CAJA_PATHBAR_H */
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index e25a0ba0..86c50ab8 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -271,39 +271,6 @@ handle_go_forward (CajaNavigationWindowSlot *navigation_slot,
g_list_free_1 (link);
}
-static void
-handle_go_elsewhere (CajaWindowSlot *slot, GFile *location)
-{
-#if !NEW_UI_COMPLETE
- CajaNavigationWindowSlot *navigation_slot;
-
- if (CAJA_IS_NAVIGATION_WINDOW_SLOT (slot))
- {
- navigation_slot = CAJA_NAVIGATION_WINDOW_SLOT (slot);
-
- /* Clobber the entire forward list, and move displayed location to back list */
- caja_navigation_window_slot_clear_forward_list (navigation_slot);
-
- if (slot->location != NULL)
- {
- /* If we're returning to the same uri somehow, don't put this uri on back list.
- * This also avoids a problem where set_displayed_location
- * didn't update last_location_bookmark since the uri didn't change.
- */
- if (!g_file_equal (slot->location, location))
- {
- /* Store bookmark for current location in back list, unless there is no current location */
- check_last_bookmark_location_matches_slot (slot);
- /* Use the first bookmark in the history list rather than creating a new one. */
- navigation_slot->back_list = g_list_prepend (navigation_slot->back_list,
- slot->last_location_bookmark);
- g_object_ref (navigation_slot->back_list->data);
- }
- }
- }
-#endif
-}
-
void
caja_window_update_up_button (CajaWindow *window)
{
@@ -455,7 +422,6 @@ update_history (CajaWindowSlot *slot,
case CAJA_LOCATION_CHANGE_STANDARD:
case CAJA_LOCATION_CHANGE_FALLBACK:
caja_window_slot_add_current_location_to_history_list (slot);
- handle_go_elsewhere (slot, new_location);
return;
case CAJA_LOCATION_CHANGE_RELOAD:
/* for reload there is no work to do */
@@ -773,18 +739,6 @@ caja_window_slot_go_home (CajaWindowSlot *slot, gboolean new_tab)
g_object_unref (home);
}
-#if 0
-static char *
-caja_window_slot_get_view_label (CajaWindowSlot *slot)
-{
- const CajaViewInfo *info;
-
- info = caja_view_factory_lookup (caja_window_slot_get_content_view_id (slot));
-
- return g_strdup (info->label);
-}
-#endif
-
static char *
caja_window_slot_get_view_error_label (CajaWindowSlot *slot)
{