summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-03-05 02:14:49 +0100
committerZenWalker <[email protected]>2019-03-07 00:00:20 +0100
commitfc9a637006bab37dbb73c678983032111831a623 (patch)
treecd6e7ccb63135b737b244a89f0589603e3aecf1c /src
parentee16c212d5ce11f6d782f86bb62302356b163462 (diff)
downloadcaja-fc9a637006bab37dbb73c678983032111831a623.tar.bz2
caja-fc9a637006bab37dbb73c678983032111831a623.tar.xz
avoid variables set but not used
Diffstat (limited to 'src')
-rw-r--r--src/caja-application.c4
-rw-r--r--src/caja-connect-server-dialog-nonmain.c4
-rw-r--r--src/caja-connect-server-dialog.c3
-rw-r--r--src/caja-emblem-sidebar.c3
-rw-r--r--src/caja-places-sidebar.c5
-rw-r--r--src/caja-property-browser.c14
-rw-r--r--src/caja-side-pane.c2
-rw-r--r--src/caja-spatial-window.c14
-rw-r--r--src/file-manager/fm-icon-view.c4
9 files changed, 7 insertions, 46 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index c82f5ec1..ed4eaca9 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -1367,10 +1367,8 @@ autorun_show_window (GMount *mount, gpointer user_data)
GFile *location;
CajaApplication *application = user_data;
CajaWindow *window;
- gboolean existing;
location = g_mount_get_root (mount);
- existing = FALSE;
/* There should probably be an easier way to do this */
if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_ALWAYS_USE_BROWSER)) {
@@ -2349,7 +2347,6 @@ init_gtk_accels (void)
static void
caja_application_startup (GApplication *app)
{
- GList *drives;
CajaApplication *self = CAJA_APPLICATION (app);
GApplication *instance;
gboolean exit_with_last_window;
@@ -2422,7 +2419,6 @@ caja_application_startup (GApplication *app)
G_CALLBACK (drive_connected_callback), self, 0);
/* listen for eject button presses */
- drives = g_volume_monitor_get_connected_drives ( self->priv->volume_monitor);
self->automount_idle_id =
g_idle_add_full (G_PRIORITY_LOW,
automount_all_volumes_idle_cb,
diff --git a/src/caja-connect-server-dialog-nonmain.c b/src/caja-connect-server-dialog-nonmain.c
index e57ce622..e08dfd3d 100644
--- a/src/caja-connect-server-dialog-nonmain.c
+++ b/src/caja-connect-server-dialog-nonmain.c
@@ -38,10 +38,6 @@ window_go_to_cb (CajaWindow *window,
GError *error,
gpointer user_data)
{
- CajaConnectServerDialog *self;
-
- self = user_data;
-
if (error != NULL) {
g_simple_async_result_set_from_error (display_location_res, error);
}
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index c612fcda..c08ae9d2 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -388,14 +388,13 @@ connect_dialog_request_additional_details (CajaConnectServerDialog *self,
const gchar *default_user,
const gchar *default_domain)
{
- GtkWidget *content_area, *label, *entry, *hbox, *icon;
+ GtkWidget *content_area, *label, *hbox, *icon;
self->details->fill_details_flags = flags;
connect_dialog_restore_info_bar (self, GTK_MESSAGE_WARNING);
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (self->details->info_bar));
- entry = NULL;
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 6);
diff --git a/src/caja-emblem-sidebar.c b/src/caja-emblem-sidebar.c
index 2c35688c..03767d54 100644
--- a/src/caja-emblem-sidebar.c
+++ b/src/caja-emblem-sidebar.c
@@ -1075,9 +1075,6 @@ caja_emblem_sidebar_class_init (CajaEmblemSidebarClass *object_klass)
{
GObjectClass *gobject_class;
- CajaEmblemSidebarClass *klass;
-
- klass = CAJA_EMBLEM_SIDEBAR_CLASS (object_klass);
gobject_class = G_OBJECT_CLASS (object_klass);
gobject_class->finalize = caja_emblem_sidebar_finalize;
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index 868ff725..0a479095 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -2929,9 +2929,7 @@ bookmarks_motion_event_cb (GtkWidget *widget,
CajaPlacesSidebar *sidebar)
{
GtkTreePath *path;
- GtkTreeModel *model;
- model = GTK_TREE_MODEL (sidebar->filter_model);
path = NULL;
if (over_eject_button (sidebar, event->x, event->y, &path)) {
@@ -3073,11 +3071,8 @@ icon_cell_renderer_func (GtkTreeViewColumn *column,
GtkTreeIter *iter,
gpointer user_data)
{
- CajaPlacesSidebar *sidebar;
PlaceType type;
- sidebar = user_data;
-
gtk_tree_model_get (model, iter,
PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type,
-1);
diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c
index f269b6e4..ebb1e5e2 100644
--- a/src/caja-property-browser.c
+++ b/src/caja-property-browser.c
@@ -1709,9 +1709,7 @@ element_clicked_callback (GtkWidget *image_table,
{
CajaPropertyBrowser *property_browser;
GtkTargetList *target_list;
- GdkDragContext *context;
const char *element_name;
- GdkDragAction action;
g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table));
g_return_if_fail (EEL_IS_LABELED_IMAGE (child));
@@ -1743,15 +1741,15 @@ element_clicked_callback (GtkWidget *image_table,
target_list = gtk_target_list_new (drag_types, G_N_ELEMENTS (drag_types));
caja_property_browser_set_dragged_file(property_browser, element_name);
- action = event->button == 3 ? GDK_ACTION_ASK : GDK_ACTION_MOVE | GDK_ACTION_COPY;
g_object_set_data (G_OBJECT (property_browser), "dragged-image", child);
- context = gtk_drag_begin (GTK_WIDGET (property_browser),
- target_list,
- GDK_ACTION_ASK | GDK_ACTION_MOVE | GDK_ACTION_COPY,
- event->button,
- event->event);
+ gtk_drag_begin (GTK_WIDGET (property_browser),
+ target_list,
+ GDK_ACTION_ASK | GDK_ACTION_MOVE | GDK_ACTION_COPY,
+ event->button,
+ event->event);
+
gtk_target_list_unref (target_list);
/* optionally (if the shift key is down) hide the property browser - it will later be destroyed when the drag ends */
diff --git a/src/caja-side-pane.c b/src/caja-side-pane.c
index 34cc9dc3..892e34f0 100644
--- a/src/caja-side-pane.c
+++ b/src/caja-side-pane.c
@@ -134,10 +134,8 @@ static void
caja_side_pane_class_init (CajaSidePaneClass *klass)
{
GObjectClass *gobject_class;
- GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
gobject_class->finalize = caja_side_pane_finalize;
gobject_class->dispose = caja_side_pane_dispose;
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c
index ec088035..1013eb75 100644
--- a/src/caja-spatial-window.c
+++ b/src/caja-spatial-window.c
@@ -963,15 +963,6 @@ static const GtkActionEntry spatial_entries[] =
},
};
-static const char* icon_entries[] =
-{
- "/MenuBar/Other Menus/Places/Home",
- "/MenuBar/Other Menus/Places/Go to Computer",
- "/MenuBar/Other Menus/Places/Go to Templates",
- "/MenuBar/Other Menus/Places/Go to Trash",
- "/MenuBar/Other Menus/Places/Go to Network"
-};
-
static void
caja_spatial_window_init (CajaSpatialWindow *window)
{
@@ -982,7 +973,6 @@ caja_spatial_window_init (CajaSpatialWindow *window)
GtkTargetList *targets;
const char *ui;
int i;
- GtkWidget *menuitem;
CajaWindow *win;
CajaWindowPane *pane;
@@ -1080,10 +1070,6 @@ caja_spatial_window_init (CajaSpatialWindow *window)
ui = caja_ui_string_get ("caja-spatial-window-ui.xml");
gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL);
- for (i = 0; i < G_N_ELEMENTS (icon_entries); i++)
- {
- menuitem = gtk_ui_manager_get_widget (ui_manager, icon_entries[i]);
- }
caja_window_set_active_pane (win, pane);
}
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 147218ab..fa71811e 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -546,10 +546,6 @@ fm_icon_view_clear (FMDirectoryView *view)
static gboolean
should_show_file_on_screen (FMDirectoryView *view, CajaFile *file)
{
- FMIconView *icon_view;
-
- icon_view = FM_ICON_VIEW (view);
-
if (!fm_directory_view_should_show_file (view, file))
{
return FALSE;