summaryrefslogtreecommitdiff
path: root/src/file-manager
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
committerStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
commit3ec2cb1ade8ed91ed472091adcc592485dc49f4d (patch)
tree122f234160898266040a89a6767871856bd607c9 /src/file-manager
parent8379b1dc107c9e0daf31ef1b654c9ab44d9bac23 (diff)
parentc598aa7e65d9e370c63f883acbbb6504044c2531 (diff)
downloadcaja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.bz2
caja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.xz
Merge pull request #65 from jasmineaura/develop
Most of remaining deprecations, some cleanups, and a leak fix
Diffstat (limited to 'src/file-manager')
-rw-r--r--src/file-manager/fm-desktop-icon-view.c4
-rw-r--r--src/file-manager/fm-directory-view.c14
-rw-r--r--src/file-manager/fm-icon-view.c2
-rw-r--r--src/file-manager/fm-list-view.c8
-rw-r--r--src/file-manager/fm-properties-window.c4
-rw-r--r--src/file-manager/fm-tree-model.c9
-rw-r--r--src/file-manager/fm-tree-view.c4
7 files changed, 8 insertions, 37 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 3885ca13..06fdc930 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -575,8 +575,8 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (icon_container));
vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (icon_container));
- eel_gtk_adjustment_set_value (hadj, 0);
- eel_gtk_adjustment_set_value (vadj, 0);
+ gtk_adjustment_set_value (hadj, 0);
+ gtk_adjustment_set_value (vadj, 0);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (desktop_icon_view),
GTK_SHADOW_NONE);
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index e0dfce34..8b1afaaf 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1189,10 +1189,8 @@ select_pattern (FMDirectoryView *view)
GtkWidget *example;
GtkWidget *table;
GtkWidget *entry;
- GList *ret;
char *example_pattern;
- ret = NULL;
dialog = gtk_dialog_new_with_buttons (_("Select Items Matching"),
fm_directory_view_get_containing_window (view),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -1318,7 +1316,6 @@ action_save_search_as_callback (GtkAction *action,
{
FMDirectoryView *directory_view;
CajaSearchDirectory *search;
- CajaQuery *query;
GtkWidget *dialog, *table, *label, *entry, *chooser, *save_button;
const char *entry_text;
char *filename, *filename_utf8, *dirname, *path, *uri;
@@ -1330,8 +1327,6 @@ action_save_search_as_callback (GtkAction *action,
CAJA_IS_SEARCH_DIRECTORY (directory_view->details->model)) {
search = CAJA_SEARCH_DIRECTORY (directory_view->details->model);
- query = caja_search_directory_get_query (search);
-
dialog = gtk_dialog_new_with_buttons (_("Save Search as"),
fm_directory_view_get_containing_window (directory_view),
0,
@@ -6834,6 +6829,7 @@ connect_to_server_response_callback (GtkDialog *dialog,
int response_id,
gpointer data)
{
+#ifdef GIO_CONVERSION_DONE
GtkEntry *entry;
char *uri;
const char *name;
@@ -6846,9 +6842,7 @@ connect_to_server_response_callback (GtkDialog *dialog,
uri = g_object_get_data (G_OBJECT (dialog), "link-uri");
icon = g_object_get_data (G_OBJECT (dialog), "link-icon");
name = gtk_entry_get_text (entry);
-#ifdef GIO_CONVERSION_DONE
mate_vfs_connect_to_server (uri, (char *)name, icon);
-#endif
gtk_widget_destroy (GTK_WIDGET (dialog));
break;
case GTK_RESPONSE_NONE:
@@ -6859,6 +6853,9 @@ connect_to_server_response_callback (GtkDialog *dialog,
default :
g_assert_not_reached ();
}
+#endif
+ /* FIXME: the above code should make a server connection permanent */
+ gtk_widget_destroy (GTK_WIDGET (dialog));
}
static void
@@ -9551,9 +9548,6 @@ metadata_for_files_in_directory_ready_callback (CajaDirectory *directory,
static void
finish_undoredo_callback (gpointer data)
{
- FMDirectoryView *view;
-
- view = FM_DIRECTORY_VIEW (data);
}
char **
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 414aae37..c624610a 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -1470,12 +1470,10 @@ fm_icon_view_set_zoom_level (FMIconView *view,
static void
fm_icon_view_bump_zoom_level (FMDirectoryView *view, int zoom_increment)
{
- FMIconView *icon_view;
CajaZoomLevel new_level;
g_return_if_fail (FM_IS_ICON_VIEW (view));
- icon_view = FM_ICON_VIEW (view);
new_level = fm_icon_view_get_zoom_level (view) + zoom_increment;
if (new_level >= CAJA_ZOOM_LEVEL_SMALLEST &&
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 1ed8cd91..72e3f55c 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -531,7 +531,6 @@ motion_notify_callback (GtkWidget *widget,
gpointer callback_data)
{
FMListView *view;
- GdkDragContext *context;
view = FM_LIST_VIEW (callback_data);
@@ -581,7 +580,7 @@ motion_notify_callback (GtkWidget *widget,
event->x,
event->y))
{
- context = gtk_drag_begin
+ gtk_drag_begin
(widget,
source_target_list,
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_ASK,
@@ -663,7 +662,6 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
GtkTreeView *tree_view;
GtkTreePath *path;
gboolean call_parent;
- gboolean allow_drag;
GtkTreeSelection *selection;
GtkWidgetClass *tree_view_class;
gint64 current_time;
@@ -715,7 +713,6 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
view->details->ignore_button_release = FALSE;
call_parent = TRUE;
- allow_drag = FALSE;
if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
&path, NULL, NULL, NULL))
{
@@ -1220,11 +1217,8 @@ sort_criterion_changes_due_to_user (GtkTreeView *tree_view)
GList *columns, *p;
GtkTreeViewColumn *column;
GSignalInvocationHint *ihint;
- unsigned int sort_signal_id;
gboolean ret;
- sort_signal_id = g_signal_lookup ("clicked", gtk_tree_view_column_get_type ());
-
ret = FALSE;
columns = gtk_tree_view_get_columns (tree_view);
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 29666607..a62fbec5 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -739,13 +739,11 @@ static void
rename_callback (CajaFile *file, GFile *res_loc, GError *error, gpointer callback_data)
{
FMPropertiesWindow *window;
- char *new_name;
window = FM_PROPERTIES_WINDOW (callback_data);
/* Complain to user if rename failed. */
if (error != NULL) {
- new_name = window->details->pending_name;
fm_report_error_renaming_file (file,
window->details->pending_name,
error,
@@ -5226,7 +5224,7 @@ create_properties_window (StartupData *startup_data)
CAJA_FILE_ATTRIBUTE_INFO |
CAJA_FILE_ATTRIBUTE_LINK_INFO;
- caja_file_monitor_add (CAJA_FILE (l->data),
+ caja_file_monitor_add (file,
&window->details->original_files,
attributes);
}
diff --git a/src/file-manager/fm-tree-model.c b/src/file-manager/fm-tree-model.c
index 6babc2d3..604c660e 100644
--- a/src/file-manager/fm-tree-model.c
+++ b/src/file-manager/fm-tree-model.c
@@ -753,8 +753,6 @@ report_dummy_row_contents_changed (FMTreeModel *model, TreeNode *parent)
static void
stop_monitoring_directory (FMTreeModel *model, TreeNode *node)
{
- CajaDirectory *directory;
-
if (node->done_loading_id == 0)
{
g_assert (node->files_added_id == 0);
@@ -762,8 +760,6 @@ stop_monitoring_directory (FMTreeModel *model, TreeNode *node)
return;
}
- directory = node->directory;
-
g_signal_handler_disconnect (node->directory, node->done_loading_id);
g_signal_handler_disconnect (node->directory, node->files_added_id);
g_signal_handler_disconnect (node->directory, node->files_changed_id);
@@ -1347,12 +1343,10 @@ static void
fm_tree_model_get_value (GtkTreeModel *model, GtkTreeIter *iter, int column, GValue *value)
{
TreeNode *node, *parent;
- FMTreeModel *fm_model;
g_return_if_fail (FM_IS_TREE_MODEL (model));
g_return_if_fail (iter_is_valid (FM_TREE_MODEL (model), iter));
- fm_model = FM_TREE_MODEL (model);
node = iter->user_data;
switch (column)
@@ -1482,15 +1476,12 @@ fm_tree_model_iter_has_child (GtkTreeModel *model, GtkTreeIter *iter)
static int
fm_tree_model_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
{
- FMTreeModel *tree_model;
TreeNode *parent, *node;
int n;
g_return_val_if_fail (FM_IS_TREE_MODEL (model), FALSE);
g_return_val_if_fail (iter == NULL || iter_is_valid (FM_TREE_MODEL (model), iter), FALSE);
- tree_model = FM_TREE_MODEL (model);
-
if (iter == NULL)
{
return 1;
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index 32053db3..5c0e96fc 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -617,10 +617,6 @@ static char *
get_root_uri_callback (CajaTreeViewDragDest *dest,
gpointer user_data)
{
- FMTreeView *view;
-
- view = FM_TREE_VIEW (user_data);
-
/* Don't allow drops on background */
return NULL;
}