[nautilus] window: remove unused and confusing code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: remove unused and confusing code
- Date: Tue, 11 Jan 2011 16:27:24 +0000 (UTC)
commit 395ba0fd8f679e6e2674eb0ce5976638edb9d979
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 11 17:26:38 2011 +0100
window: remove unused and confusing code
src/nautilus-window-slot.c | 15 ++-------------
src/nautilus-window-slot.h | 1 -
src/nautilus-window.c | 9 ---------
src/nautilus-window.h | 1 -
4 files changed, 2 insertions(+), 24 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 6f5ea8c..19cb6d1 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -277,18 +277,6 @@ nautilus_window_slot_make_hosting_pane_active (NautilusWindowSlot *slot)
nautilus_window_set_active_slot (slot->pane->window, slot);
}
-char *
-nautilus_window_slot_get_title (NautilusWindowSlot *slot)
-{
- char *title;
-
- g_assert (NAUTILUS_IS_WINDOW_SLOT (slot));
-
- title = nautilus_compute_title_for_location (slot->location);
-
- return title;
-}
-
NautilusWindow *
nautilus_window_slot_get_window (NautilusWindowSlot *slot)
{
@@ -347,8 +335,9 @@ nautilus_window_slot_update_title (NautilusWindowSlot *slot)
{
char *title;
- title = nautilus_window_slot_get_title (slot);
+ title = nautilus_compute_title_for_location (slot->location);
nautilus_window_slot_set_title (slot, title);
+
g_free (title);
}
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
index c72e946..5b270ee 100644
--- a/src/nautilus-window-slot.h
+++ b/src/nautilus-window-slot.h
@@ -117,7 +117,6 @@ struct NautilusWindowSlot {
GType nautilus_window_slot_get_type (void);
-char * nautilus_window_slot_get_title (NautilusWindowSlot *slot);
void nautilus_window_slot_update_title (NautilusWindowSlot *slot);
void nautilus_window_slot_update_icon (NautilusWindowSlot *slot);
void nautilus_window_slot_update_query_editor (NautilusWindowSlot *slot);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index bdd1055..da6e754 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1267,14 +1267,6 @@ nautilus_window_display_error (NautilusWindow *window, const char *error_msg)
gtk_widget_show (dialog);
}
-static char *
-real_get_title (NautilusWindow *window)
-{
- g_assert (NAUTILUS_IS_WINDOW (window));
-
- return nautilus_window_slot_get_title (window->details->active_pane->active_slot);
-}
-
void
nautilus_window_sync_title (NautilusWindow *window,
NautilusWindowSlot *slot)
@@ -1773,7 +1765,6 @@ nautilus_window_class_init (NautilusWindowClass *class)
GTK_WIDGET_CLASS (class)->get_preferred_height = nautilus_window_get_preferred_height;
GTK_WIDGET_CLASS (class)->realize = nautilus_window_realize;
GTK_WIDGET_CLASS (class)->key_press_event = nautilus_window_key_press_event;
- class->get_title = real_get_title;
class->set_allow_up = real_set_allow_up;
class->close_slot = real_close_slot;
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index c3e2eb1..0aa6c71 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -86,7 +86,6 @@ typedef struct {
/* Function pointers for overriding, without corresponding signals */
- char * (* get_title) (NautilusWindow *window);
void (* sync_title) (NautilusWindow *window,
NautilusWindowSlot *slot);
NautilusIconInfo * (* get_icon) (NautilusWindow *window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]