summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Miranda <andreldm@xfce.org>2017-08-25 22:58:08 -0300
committerAndre Miranda <andreldm@xfce.org>2017-08-25 22:58:08 -0300
commita35ff1e751de14b9759b28016655a57bd67d075c (patch)
treea14ca85f813baa9b2de507a4a27b7462305aac99
parent4432eede88504f7141d6b3cedae4a182e18ed674 (diff)
downloadthunar-a35ff1e751de14b9759b28016655a57bd67d075c.tar.gz
Fix some non-deprecation warnings
-rw-r--r--plugins/thunar-uca/thunar-uca-chooser.c1
-rw-r--r--thunar/thunar-application.c6
-rw-r--r--thunar/thunar-chooser-dialog.c1
-rw-r--r--thunar/thunar-dbus-service.c5
-rw-r--r--thunar/thunar-location-button.c29
-rw-r--r--thunar/thunar-location-buttons.c8
-rw-r--r--thunar/thunar-location-entry.c2
-rw-r--r--thunar/thunar-session-client.c5
-rw-r--r--thunar/thunar-shortcuts-pane.c2
-rw-r--r--thunar/thunar-standard-view.c2
-rw-r--r--thunar/thunar-statusbar.c7
-rw-r--r--thunar/thunar-templates-action.c1
-rw-r--r--thunar/thunar-thumbnailer.c10
-rw-r--r--thunar/thunar-window.c3
14 files changed, 30 insertions, 52 deletions
diff --git a/plugins/thunar-uca/thunar-uca-chooser.c b/plugins/thunar-uca/thunar-uca-chooser.c
index 399f82b0..e82f4088 100644
--- a/plugins/thunar-uca/thunar-uca-chooser.c
+++ b/plugins/thunar-uca/thunar-uca-chooser.c
@@ -117,7 +117,6 @@ thunar_uca_chooser_init (ThunarUcaChooser *uca_chooser)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
ThunarUcaModel *uca_model;
- GtkWidget *button;
gboolean have_header_bar;
/* Initialize the template for this instance */
diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index afd9e6c0..7781884a 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -111,7 +111,6 @@ static void thunar_application_set_property (GObject
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void thunar_application_init (ThunarApplication *application);
static void thunar_application_dbus_acquired_cb (GDBusConnection *conn,
const gchar *name,
gpointer user_data);
@@ -153,8 +152,6 @@ static void thunar_application_launch (ThunarApplicati
GList *source_path_list,
GList *target_path_list,
GClosure *new_files_closure);
-static void thunar_application_window_destroyed (GtkWidget *window,
- ThunarApplication *application);
#ifdef HAVE_GUDEV
static void thunar_application_uevent (GUdevClient *client,
const gchar *action,
@@ -386,7 +383,6 @@ static void
thunar_application_shutdown (GApplication *gapp)
{
ThunarApplication *application = THUNAR_APPLICATION (gapp);
- GList *lp;
/* unqueue all files waiting to be processed */
thunar_g_file_list_free (application->files_to_launch);
@@ -446,8 +442,6 @@ thunar_application_shutdown (GApplication *gapp)
static void
thunar_application_finalize (GObject *object)
{
- ThunarApplication *application = THUNAR_APPLICATION (object);
-
/* rule of thumb: what gets initialized in GApplication::startup is cleaned up
* in GApplication::shutdown. Therefore, this method doesn't do very much */
diff --git a/thunar/thunar-chooser-dialog.c b/thunar/thunar-chooser-dialog.c
index 60e209a7..0ee46d6d 100644
--- a/thunar/thunar-chooser-dialog.c
+++ b/thunar/thunar-chooser-dialog.c
@@ -550,7 +550,6 @@ thunar_chooser_dialog_context_menu (ThunarChooserDialog *dialog,
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- GtkWidget *image;
GtkWidget *item;
GtkWidget *menu;
GAppInfo *app_info;
diff --git a/thunar/thunar-dbus-service.c b/thunar/thunar-dbus-service.c
index f9956e0b..c3e0c0f1 100644
--- a/thunar/thunar-dbus-service.c
+++ b/thunar/thunar-dbus-service.c
@@ -469,7 +469,6 @@ thunar_dbus_service_display_folder (ThunarDBusFileManager *object,
g_object_unref (G_OBJECT (screen));
g_object_unref (G_OBJECT (file));
-out:
if (error)
g_dbus_method_invocation_take_error (invocation, error);
else
@@ -788,7 +787,6 @@ thunar_dbus_service_empty_trash (ThunarDBusTrash *object,
g_object_unref (G_OBJECT (screen));
}
-out:
if (error)
g_dbus_method_invocation_take_error (invocation, error);
else
@@ -852,7 +850,6 @@ thunar_dbus_service_move_to_trash (ThunarDBusTrash *object,
}
/* check if we failed */
-out:
if (err)
g_dbus_method_invocation_take_error (invocation, err);
else
@@ -878,7 +875,6 @@ thunar_dbus_service_query_trash (ThunarDBusTrash *object,
full = (thunar_file_get_item_count (dbus_service->trash_bin) > 0);
}
-out:
if (error)
g_dbus_method_invocation_take_error (invocation, error);
else
@@ -925,7 +921,6 @@ thunar_dbus_service_bulk_rename (ThunarDBusThunar *object,
/* release the cwd */
g_free (cwd);
-out:
if (error)
g_dbus_method_invocation_take_error (invocation, error);
else
diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c
index 0116adca..8898a9ba 100644
--- a/thunar/thunar-location-button.c
+++ b/thunar/thunar-location-button.c
@@ -382,9 +382,6 @@ thunar_location_button_file_changed (ThunarLocationButton *location_button,
GtkIconTheme *icon_theme;
gchar *icon_name;
const gchar *dnd_icon_name;
- gint height;
- gint width;
- gint size;
_thunar_return_if_fail (THUNAR_IS_LOCATION_BUTTON (location_button));
_thunar_return_if_fail (location_button->file == file);
@@ -511,9 +508,10 @@ static gboolean
thunar_location_button_button_press_event (GtkWidget *button,
GdkEventButton *event)
{
- _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTON (button), FALSE);
gboolean popup_menu_return;
+ _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTON (button), FALSE);
+
/* check if we can handle the button event */
if (G_UNLIKELY (event->button == 2))
{
@@ -695,10 +693,12 @@ thunar_location_button_drag_leave (GtkWidget *button,
GdkDragContext *context,
guint timestamp)
{
+ ThunarLocationButton *location_button;
+
_thunar_return_if_fail (GTK_IS_BUTTON (button));
_thunar_return_if_fail (THUNAR_IS_LOCATION_BUTTON (button));
- ThunarLocationButton *location_button = THUNAR_LOCATION_BUTTON (button);
+ location_button = THUNAR_LOCATION_BUTTON (button);
/* reset the file icon state to default appearance */
if (G_LIKELY (location_button->file_icon_state != THUNAR_FILE_ICON_STATE_DEFAULT))
@@ -733,15 +733,16 @@ thunar_location_button_drag_motion (GtkWidget *button,
gint y,
guint timestamp)
{
- ThunarFileIconState file_icon_state;
- ThunarLocationButton *location_button = THUNAR_LOCATION_BUTTON (button);
- GdkDragAction actions;
- GtkSettings *settings;
- GdkAtom target;
- gint delay;
+ ThunarFileIconState file_icon_state;
+ GdkDragAction actions;
+ GdkAtom target;
+ gint delay;
+ ThunarLocationButton *location_button;
_thunar_return_val_if_fail (GTK_IS_BUTTON (button), FALSE);
- _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTON (location_button), FALSE);
+ _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTON (button), FALSE);
+
+ location_button = THUNAR_LOCATION_BUTTON (button);
/* schedule the enter timeout if not already done */
if (G_UNLIKELY (location_button->enter_timeout_id == 0))
@@ -842,9 +843,11 @@ thunar_location_button_new (void)
static void
thunar_location_button_active_changed (ThunarLocationButton *location_button)
{
+ gboolean active;
+
_thunar_return_if_fail (THUNAR_IS_LOCATION_BUTTON (location_button));
- gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (location_button));
+ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (location_button));
/* use a bold label for active location buttons */
gtk_label_set_attributes (GTK_LABEL (location_button->label), active ? thunar_pango_attr_list_bold () : NULL);
diff --git a/thunar/thunar-location-buttons.c b/thunar/thunar-location-buttons.c
index c59ad0e3..8bf2dabc 100644
--- a/thunar/thunar-location-buttons.c
+++ b/thunar/thunar-location-buttons.c
@@ -257,8 +257,6 @@ static void
thunar_location_buttons_init (ThunarLocationButtons *buttons)
{
GtkWidget *icon;
- GList *list, *lp;
- GtkStyleContext *context;
/* setup the action group for the location buttons */
buttons->action_group = gtk_action_group_new ("ThunarLocationButtons");
@@ -1114,8 +1112,6 @@ static void
thunar_location_buttons_scroll_right (GtkWidget *button,
ThunarLocationButtons *buttons)
{
- GtkTextDirection direction;
-
if (G_UNLIKELY (buttons->ignore_click))
{
buttons->ignore_click = FALSE;
@@ -1217,8 +1213,8 @@ thunar_location_buttons_context_menu (ThunarLocationButton *button,
GtkAction *action;
GtkWidget *menu, *item;
- _thunar_return_if_fail (THUNAR_IS_LOCATION_BUTTONS (buttons));
- _thunar_return_if_fail (THUNAR_IS_LOCATION_BUTTON (button));
+ _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTONS (buttons), FALSE);
+ _thunar_return_val_if_fail (THUNAR_IS_LOCATION_BUTTON (button), FALSE);
/* determine the file for the button */
file = thunar_location_button_get_file (button);
diff --git a/thunar/thunar-location-entry.c b/thunar/thunar-location-entry.c
index fd0a65b6..c190407b 100644
--- a/thunar/thunar-location-entry.c
+++ b/thunar/thunar-location-entry.c
@@ -432,8 +432,6 @@ thunar_location_entry_reload (GtkEntry *entry,
GdkEvent *event,
ThunarLocationEntry *location_entry)
{
- GtkAction *action;
-
_thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (location_entry));
if (icon_pos == GTK_ENTRY_ICON_SECONDARY)
diff --git a/thunar/thunar-session-client.c b/thunar/thunar-session-client.c
index 10177892..26d8d055 100644
--- a/thunar/thunar-session-client.c
+++ b/thunar/thunar-session-client.c
@@ -37,6 +37,7 @@
#endif
#include <glib/gstdio.h>
+#include <gdk/gdkx.h>
#include <thunar/thunar-application.h>
#include <thunar/thunar-ice.h>
@@ -335,10 +336,12 @@ static void
thunar_session_client_die (SmcConn connection,
ThunarSessionClient *session_client)
{
+ ThunarApplication* application;
+
_thunar_return_if_fail (THUNAR_IS_SESSION_CLIENT (session_client));
_thunar_return_if_fail (session_client->connection == connection);
- ThunarApplication* application = thunar_application_get ();
+ application = thunar_application_get ();
thunar_application_quit (application);
}
diff --git a/thunar/thunar-shortcuts-pane.c b/thunar/thunar-shortcuts-pane.c
index 1838eb2d..93557bcd 100644
--- a/thunar/thunar-shortcuts-pane.c
+++ b/thunar/thunar-shortcuts-pane.c
@@ -186,7 +186,7 @@ thunar_shortcuts_pane_init (ThunarShortcutsPane *shortcuts_pane)
gtk_css_provider_load_from_data (provider, ".frame { border-right-width: 0px; }", -1, NULL);
gtk_style_context_add_provider (
- GTK_STYLE_CONTEXT (gtk_widget_get_style_context (shortcuts_pane)),
+ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (shortcuts_pane))),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index ffcae587..ca7086b6 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -742,7 +742,7 @@ thunar_standard_view_init (ThunarStandardView *standard_view)
gtk_css_provider_load_from_data (provider, ".frame { border-left-width: 0px; }", -1, NULL);
gtk_style_context_add_provider (
- GTK_STYLE_CONTEXT (gtk_widget_get_style_context (standard_view)),
+ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (standard_view))),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
diff --git a/thunar/thunar-statusbar.c b/thunar/thunar-statusbar.c
index 6a007030..4cf09a7a 100644
--- a/thunar/thunar-statusbar.c
+++ b/thunar/thunar-statusbar.c
@@ -90,7 +90,8 @@ thunar_statusbar_class_init (ThunarStatusbarClass *klass)
if (!style_initialized)
{
- gtk_widget_class_install_style_property (gobject_class, g_param_spec_enum (
+ gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (gobject_class),
+ g_param_spec_enum (
"shadow-type", //name
"shadow-type", //nick
"type of shadow", //blurb
@@ -108,8 +109,8 @@ thunar_statusbar_init (ThunarStatusbar *statusbar)
statusbar->context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Main text");
/* make the status thinner */
- gtk_widget_set_margin_top (statusbar, 0);
- gtk_widget_set_margin_bottom (statusbar, 0);
+ gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
+ gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);
}
diff --git a/thunar/thunar-templates-action.c b/thunar/thunar-templates-action.c
index f03d0f50..c6c9a92e 100644
--- a/thunar/thunar-templates-action.c
+++ b/thunar/thunar-templates-action.c
@@ -469,7 +469,6 @@ static void
thunar_templates_action_load_finished (ThunarJob *job,
ThunarTemplatesAction *templates_action)
{
- GtkWidget *image;
GtkWidget *item;
GtkWidget *menu;
diff --git a/thunar/thunar-thumbnailer.c b/thunar/thunar-thumbnailer.c
index a55db099..37cdf0e1 100644
--- a/thunar/thunar-thumbnailer.c
+++ b/thunar/thunar-thumbnailer.c
@@ -120,9 +120,6 @@ static void thunar_thumbnailer_thumbnailer_ready (GDBusPr
guint32 handle,
const gchar **uris,
ThunarThumbnailer *thumbnailer);
-static guint thunar_thumbnailer_queue_async (ThunarThumbnailer *thumbnailer,
- gchar **uris,
- const gchar **mime_hints);
static void thunar_thumbnailer_idle (ThunarThumbnailer *thumbnailer,
guint handle,
ThunarThumbnailerIdleType type,
@@ -260,7 +257,7 @@ thunar_thumbnailer_queue_async_reply (GObject *proxy,
ThunarThumbnailerJob *job = user_data;
ThunarThumbnailer *thumbnailer = THUNAR_THUMBNAILER (job->thumbnailer);
GError *error = NULL;
- int handle;
+ guint handle;
_thunar_return_if_fail (THUNAR_IS_THUMBNAILER_DBUS (proxy));
_thunar_return_if_fail (job != NULL);
@@ -299,7 +296,7 @@ thunar_thumbnailer_queue_async_reply (GObject *proxy,
/* NOTE: assumes that the lock is held by the caller */
-gboolean
+static gboolean
thunar_thumbnailer_begin_job (ThunarThumbnailer *thumbnailer,
ThunarThumbnailerJob *job)
{
@@ -455,7 +452,6 @@ thunar_thumbnailer_finalize (GObject *object)
{
ThunarThumbnailer *thumbnailer = THUNAR_THUMBNAILER (object);
ThunarThumbnailerIdle *idle;
- ThunarThumbnailerJob *job;
GSList *lp;
/* acquire the thumbnailer lock */
@@ -687,8 +683,6 @@ thunar_thumbnailer_proxy_created (GObject *object,
static void
thunar_thumbnailer_init_thumbnailer_proxy (ThunarThumbnailer *thumbnailer)
{
- GError *error = NULL;
-
_thumbnailer_lock (thumbnailer);
thumbnailer->thumbnailer_proxy = NULL;
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 21f446c3..87e54d92 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -2274,9 +2274,6 @@ static void
thunar_window_start_open_location (ThunarWindow *window,
const gchar *initial_text)
{
- ThunarFile *selected_file;
- GtkWidget *dialog;
-
_thunar_return_if_fail (THUNAR_IS_WINDOW (window));
/* temporary show the location toolbar, even if it is normally hidden */