[nautilus/freedesktop-dbus] Use a single method to create properties windows
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/freedesktop-dbus] Use a single method to create properties windows
- Date: Wed, 14 Dec 2011 11:30:08 +0000 (UTC)
commit 371e178550587cad04941493c6129e8e454223ab
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 14 12:26:20 2011 +0100
Use a single method to create properties windows
Make startup_id a param of nautilus_properties_window_present().
src/nautilus-freedesktop-dbus.c | 2 +-
src/nautilus-places-sidebar.c | 2 +-
src/nautilus-properties-window.c | 15 ++++-----------
src/nautilus-properties-window.h | 8 +++-----
src/nautilus-tree-sidebar.c | 4 ++--
src/nautilus-view.c | 6 +++---
6 files changed, 14 insertions(+), 23 deletions(-)
---
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
index 3051bc8..cdeaeb0 100644
--- a/src/nautilus-freedesktop-dbus.c
+++ b/src/nautilus-freedesktop-dbus.c
@@ -141,7 +141,7 @@ skeleton_handle_show_item_properties_cb (NautilusFreedesktopFileManager1 *object
files = g_list_reverse (files);
- nautilus_properties_window_present_with_startup_id (files, startup_id);
+ nautilus_properties_window_present (files, NULL, startup_id);
nautilus_file_list_free (files);
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index b634399..a9d6b34 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -2546,7 +2546,7 @@ properties_cb (GtkMenuItem *item,
file = nautilus_file_get_by_uri (uri);
list = g_list_prepend (NULL, nautilus_file_ref (file));
- nautilus_properties_window_present (list, GTK_WIDGET (sidebar));
+ nautilus_properties_window_present (list, GTK_WIDGET (sidebar), NULL);
nautilus_file_list_free (list);
g_free (uri);
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 204b6ed..f00850c 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -5101,20 +5101,13 @@ prepare_properties_window (GList *original_files,
}
void
-nautilus_properties_window_present (GList *original_files,
- GtkWidget *parent_widget)
+nautilus_properties_window_present (GList *original_files,
+ GtkWidget *parent_widget,
+ const gchar *startup_id)
{
- prepare_properties_window (original_files, parent_widget, NULL);
+ prepare_properties_window (original_files, parent_widget, startup_id);
}
-void
-nautilus_properties_window_present_with_startup_id (GList *original_files,
- const char *startup_id)
-{
- prepare_properties_window (original_files, NULL, startup_id);
-}
-
-
static void
real_response (GtkDialog *dialog,
int response)
diff --git a/src/nautilus-properties-window.h b/src/nautilus-properties-window.h
index 7275737..593d9d6 100644
--- a/src/nautilus-properties-window.h
+++ b/src/nautilus-properties-window.h
@@ -61,10 +61,8 @@ typedef struct NautilusPropertiesWindowClass NautilusPropertiesWindowClass;
GType nautilus_properties_window_get_type (void);
-void nautilus_properties_window_present (GList *files,
- GtkWidget *parent_widget);
-
-void nautilus_properties_window_present_with_startup_id (GList *files,
- const char *startup_id);
+void nautilus_properties_window_present (GList *files,
+ GtkWidget *parent_widget,
+ const gchar *startup_id);
#endif /* NAUTILUS_PROPERTIES_WINDOW_H */
diff --git a/src/nautilus-tree-sidebar.c b/src/nautilus-tree-sidebar.c
index 4edcd27..5849efc7 100644
--- a/src/nautilus-tree-sidebar.c
+++ b/src/nautilus-tree-sidebar.c
@@ -858,7 +858,7 @@ new_folder_done (GFile *new_folder, gpointer data)
*/
list = g_list_prepend (NULL, nautilus_file_get (new_folder));
- nautilus_properties_window_present (list, GTK_WIDGET (data));
+ nautilus_properties_window_present (list, GTK_WIDGET (data), NULL);
nautilus_file_list_free (list);
}
@@ -1056,7 +1056,7 @@ fm_tree_view_properties_cb (GtkWidget *menu_item,
list = g_list_prepend (NULL, nautilus_file_ref (view->details->popup_file));
- nautilus_properties_window_present (list, GTK_WIDGET (view->details->tree_widget));
+ nautilus_properties_window_present (list, GTK_WIDGET (view->details->tree_widget), NULL);
nautilus_file_list_free (list);
}
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 576c8b8..214649c 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2056,12 +2056,12 @@ action_properties_callback (GtkAction *action,
if (view->details->directory_as_file != NULL) {
files = g_list_append (NULL, nautilus_file_ref (view->details->directory_as_file));
- nautilus_properties_window_present (files, GTK_WIDGET (view));
+ nautilus_properties_window_present (files, GTK_WIDGET (view), NULL);
nautilus_file_list_free (files);
}
} else {
- nautilus_properties_window_present (selection, GTK_WIDGET (view));
+ nautilus_properties_window_present (selection, GTK_WIDGET (view), NULL);
}
nautilus_file_list_free (selection);
}
@@ -2080,7 +2080,7 @@ action_location_properties_callback (GtkAction *action,
files = g_list_append (NULL, nautilus_file_ref (view->details->location_popup_directory_as_file));
- nautilus_properties_window_present (files, GTK_WIDGET (view));
+ nautilus_properties_window_present (files, GTK_WIDGET (view), NULL);
nautilus_file_list_free (files);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]