summaryrefslogtreecommitdiff
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
parentee16c212d5ce11f6d782f86bb62302356b163462 (diff)
downloadcaja-fc9a637006bab37dbb73c678983032111831a623.tar.bz2
caja-fc9a637006bab37dbb73c678983032111831a623.tar.xz
avoid variables set but not used
-rw-r--r--eel/eel-image-table.c4
-rw-r--r--eel/eel-labeled-image.c2
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c3
-rw-r--r--libcaja-private/caja-icon-canvas-item.c2
-rw-r--r--libcaja-private/caja-keep-last-vertical-box.c2
-rw-r--r--libcaja-private/caja-program-choosing.c3
-rw-r--r--libcaja-private/caja-progress-info.c5
-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
16 files changed, 9 insertions, 65 deletions
diff --git a/eel/eel-image-table.c b/eel/eel-image-table.c
index d3ac54e7..03de077b 100644
--- a/eel/eel-image-table.c
+++ b/eel/eel-image-table.c
@@ -99,10 +99,6 @@ eel_image_table_init (EelImageTable *image_table)
static void
eel_image_table_finalize (GObject *object)
{
- EelImageTable *image_table;
-
- image_table = EEL_IMAGE_TABLE (object);
-
G_OBJECT_CLASS (eel_image_table_parent_class)->finalize (object);
}
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c
index 04afe258..0cf10cc0 100644
--- a/eel/eel-labeled-image.c
+++ b/eel/eel-labeled-image.c
@@ -363,7 +363,6 @@ eel_labeled_image_draw (GtkWidget *widget,
EelLabeledImage *labeled_image;
EelIRect label_bounds;
GtkStyleContext *context;
- GdkWindow *window;
g_assert (EEL_IS_LABELED_IMAGE (widget));
g_assert (gtk_widget_get_realized (widget));
@@ -373,7 +372,6 @@ eel_labeled_image_draw (GtkWidget *widget,
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
- window = gtk_widget_get_window (widget);
if (gtk_widget_get_state_flags (widget) == GTK_STATE_FLAG_SELECTED ||
gtk_widget_get_state_flags (widget) == GTK_STATE_FLAG_ACTIVE)
{
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index edc809d0..61af0d92 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -562,13 +562,10 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd)
GtkWidget *widget, *dialog_area;
CajaFileConflictDialogPrivate *details;
GtkDialog *dialog;
- gboolean source_is_dir;
details = fcd->details = caja_file_conflict_dialog_get_instance_private (fcd);
dialog = GTK_DIALOG (fcd);
- source_is_dir = caja_file_is_directory (details->source);
-
/* Setup the main hbox */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
dialog_area = gtk_dialog_get_content_area (dialog);
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index b1c66822..887caddc 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -1697,7 +1697,6 @@ real_map_surface (CajaIconCanvasItem *icon_item)
{
EelCanvas *canvas;
char *audio_filename;
- CajaIconContainer *container;
GdkPixbuf *temp_pixbuf, *old_pixbuf, *audio_pixbuf;
int emblem_size;
GtkStyleContext *style;
@@ -1707,7 +1706,6 @@ real_map_surface (CajaIconCanvasItem *icon_item)
temp_pixbuf = icon_item->details->pixbuf;
canvas = EEL_CANVAS_ITEM(icon_item)->canvas;
- container = CAJA_ICON_CONTAINER (canvas);
g_object_ref (temp_pixbuf);
diff --git a/libcaja-private/caja-keep-last-vertical-box.c b/libcaja-private/caja-keep-last-vertical-box.c
index 2304acb4..b158c81a 100644
--- a/libcaja-private/caja-keep-last-vertical-box.c
+++ b/libcaja-private/caja-keep-last-vertical-box.c
@@ -89,7 +89,6 @@ static void
caja_keep_last_vertical_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- GtkBox *box;
GtkWidget *last_child, *child;
GList *children, *l;
GtkAllocation last_child_allocation, child_allocation, tiny_allocation;
@@ -99,7 +98,6 @@ caja_keep_last_vertical_box_size_allocate (GtkWidget *widget,
GTK_WIDGET_CLASS (caja_keep_last_vertical_box_parent_class)->size_allocate (widget, allocation);
- box = GTK_BOX (widget);
children = gtk_container_get_children (GTK_CONTAINER (widget));
l = g_list_last (children);
diff --git a/libcaja-private/caja-program-choosing.c b/libcaja-private/caja-program-choosing.c
index a49a96e9..920261d7 100644
--- a/libcaja-private/caja-program-choosing.c
+++ b/libcaja-private/caja-program-choosing.c
@@ -209,13 +209,12 @@ caja_launch_application_by_uri (GAppInfo *application,
GdkDisplay *display;
GdkAppLaunchContext *launch_context;
CajaIconInfo *icon;
- int count, total;
+ int count;
g_assert (uris != NULL);
/* count the number of uris with local paths */
count = 0;
- total = g_list_length (uris);
locations = NULL;
for (l = uris; l != NULL; l = l->next)
{
diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c
index 8d6885c4..dbf3db55 100644
--- a/libcaja-private/caja-progress-info.c
+++ b/libcaja-private/caja-progress-info.c
@@ -463,7 +463,7 @@ widget_reposition_as_paused (GtkWidget * widget)
ProgressWidgetData *data;
GList *children, *child;
gboolean abort = FALSE;
- int i, mypos = -1;
+ int i;
GtkWidget * container = get_widgets_container();
children = gtk_container_get_children (GTK_CONTAINER(container));
@@ -473,9 +473,6 @@ widget_reposition_as_paused (GtkWidget * widget)
data = (ProgressWidgetData*) g_object_get_data (
G_OBJECT(child->data), "data");
- if (child->data == widget)
- mypos = i;
-
if (child->data != widget && is_op_paused(data->state)) {
abort = TRUE;
i--;
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;