Commit a35ff1e7 authored by Andre Miranda's avatar Andre Miranda

Fix some non-deprecation warnings

parent 4432eede
......@@ -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 */
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -469,7 +469,6 @@ static void
thunar_templates_action_load_finished (ThunarJob *job,
ThunarTemplatesAction *templates_action)
{
GtkWidget *image;
GtkWidget *item;
GtkWidget *menu;
......
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment