From 61ad45a01a15a4a250b0b8f45da0c4a4f703094d Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 1 Feb 2016 13:38:30 +0300 Subject: [PATCH 1/4] fix a few build warnings --- plugins/filebrowser/xed-file-browser-widget.c | 3 --- xed/xed-gio-document-loader.c | 4 ---- xed/xed-prefs-manager.c | 2 +- xed/xed-progress-message-area.c | 4 ---- xed/xed-session.c | 4 ++-- xed/xed-view.c | 2 +- xed/xed-window.c | 6 +++--- 7 files changed, 7 insertions(+), 18 deletions(-) diff --git a/plugins/filebrowser/xed-file-browser-widget.c b/plugins/filebrowser/xed-file-browser-widget.c index a2a8cf6..12a50f9 100644 --- a/plugins/filebrowser/xed-file-browser-widget.c +++ b/plugins/filebrowser/xed-file-browser-widget.c @@ -2113,9 +2113,6 @@ async_free (AsyncData *async) static void set_busy (XedFileBrowserWidget *obj, gboolean busy) { -#if !GTK_CHECK_VERSION (3, 16, 0) - GdkCursor *cursor; -#endif GdkWindow *window; window = gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview)); diff --git a/xed/xed-gio-document-loader.c b/xed/xed-gio-document-loader.c index e84fc4e..bbac86c 100644 --- a/xed/xed-gio-document-loader.c +++ b/xed/xed-gio-document-loader.c @@ -288,10 +288,6 @@ close_input_stream_ready_cb (GInputStream *stream, static void write_complete (AsyncData *async) { - XedDocumentLoader *loader; - - loader = XED_DOCUMENT_LOADER (async->loader); - if (async->loader->priv->stream) g_input_stream_close_async (G_INPUT_STREAM (async->loader->priv->stream), G_PRIORITY_HIGH, diff --git a/xed/xed-prefs-manager.c b/xed/xed-prefs-manager.c index cf53c7d..ffb49f5 100644 --- a/xed/xed-prefs-manager.c +++ b/xed/xed-prefs-manager.c @@ -516,7 +516,7 @@ DEFINE_INT_PREF (print_line_numbers, DEFINE_STRING_PREF (print_font_body, GPM_PRINT_FONT_BODY) -gchar * +static gchar * xed_prefs_manager_get_default_string_value (const gchar *key) { gchar *font = NULL; diff --git a/xed/xed-progress-message-area.c b/xed/xed-progress-message-area.c index 9bab1bf..f666838 100644 --- a/xed/xed-progress-message-area.c +++ b/xed/xed-progress-message-area.c @@ -102,10 +102,6 @@ xed_progress_message_area_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - XedProgressMessageArea *area; - - area = XED_PROGRESS_MESSAGE_AREA (object); - switch (prop_id) { default: diff --git a/xed/xed-session.c b/xed/xed-session.c index cf86615..a61ebe7 100644 --- a/xed/xed-session.c +++ b/xed/xed-session.c @@ -87,11 +87,11 @@ save_window_session (GKeyFile *state_file, panel = xed_window_get_side_panel (window); g_key_file_set_boolean (state_file, group_name, "side-panel-visible", - gtk_widget_get_visible (panel)); + gtk_widget_get_visible (GTK_WIDGET (panel))); panel = xed_window_get_bottom_panel (window); g_key_file_set_boolean (state_file, group_name, "bottom-panel-visible", - gtk_widget_get_visible (panel)); + gtk_widget_get_visible (GTK_WIDGET (panel))); active_document = xed_window_get_active_document (window); if (active_document) diff --git a/xed/xed-view.c b/xed/xed-view.c index 487703a..b93bf09 100644 --- a/xed/xed-view.c +++ b/xed/xed-view.c @@ -1794,7 +1794,7 @@ start_interactive_search_real (XedView *view) gtk_widget_get_visible (view->priv->search_window)) return TRUE; - if (!gtk_widget_has_focus (view)) + if (!gtk_widget_has_focus (GTK_WIDGET (view))) return FALSE; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); diff --git a/xed/xed-window.c b/xed/xed-window.c index b9fda39..d20e29a 100644 --- a/xed/xed-window.c +++ b/xed/xed-window.c @@ -3398,9 +3398,9 @@ notebook_button_press_event (GtkNotebook *notebook, } else if (GDK_BUTTON_PRESS == event->type && 2 == event->button) { - GtkWidget *tab; - tab = GTK_WIDGET (xed_window_get_active_tab (window)); - notebook_tab_close_request (notebook, tab, window); + XedTab *tab; + tab = xed_window_get_active_tab (window); + notebook_tab_close_request (XED_NOTEBOOK (notebook), tab, GTK_WINDOW (window)); return FALSE; } From 48c5c0ad5ebb35df2a6d096ed1962d7e3ffc28c7 Mon Sep 17 00:00:00 2001 From: itzexor Date: Mon, 8 Feb 2016 19:01:04 -0800 Subject: [PATCH 2/4] Fix build with gnome-common --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 93c252f..be9bf81 100644 --- a/configure.ac +++ b/configure.ac @@ -321,7 +321,7 @@ dnl ================================================================ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) -MATE_COMPILE_WARNINGS(yes) +GNOME_COMPILE_WARNINGS(yes) AC_ARG_ENABLE(deprecations, [AS_HELP_STRING([--enable-deprecations], @@ -334,7 +334,7 @@ if test "x$enable_deprecations" = "xyes"; then -DGDK_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ --DMATE_DISABLE_DEPRECATED" +-DGNOME_DISABLE_DEPRECATED" AC_SUBST(DISABLE_DEPRECATED_CFLAGS) fi From ee18f17330114536c947306d07cfd081fdbe2e44 Mon Sep 17 00:00:00 2001 From: Sorokin Alexei Date: Wed, 10 Feb 2016 15:37:02 +0300 Subject: [PATCH 3/4] Remove MATE leftovers --- xed/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xed/Makefile.am b/xed/Makefile.am index aff539d..561e4ed 100644 --- a/xed/Makefile.am +++ b/xed/Makefile.am @@ -10,7 +10,6 @@ AM_CPPFLAGS = \ -I$(srcdir) \ -I$(srcdir)/smclient \ $(XED_CFLAGS) \ - $(MATE_DESKTOP_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ -DDATADIR=\""$(datadir)"\" \ @@ -27,8 +26,7 @@ libxed_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]] libxed_la_LIBADD = \ dialogs/libdialogs.la \ - smclient/libeggsmclient.la \ - $(MATE_DESKTOP_LIBS) + smclient/libeggsmclient.la # XED_LIBS must be the last to ensure correct order on some platforms libxed_la_LIBADD += $(XED_LIBS) -lICE From fc63ede01898c2cc14c9af135409603c6182822e Mon Sep 17 00:00:00 2001 From: Sorokin Alexei Date: Wed, 10 Feb 2016 15:38:02 +0300 Subject: [PATCH 4/4] Warnings fixes --- xed/xed-document-input-stream.c | 4 ++-- xed/xed-smart-charset-converter.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xed/xed-document-input-stream.c b/xed/xed-document-input-stream.c index 983f3b3..1fc7731 100644 --- a/xed/xed-document-input-stream.c +++ b/xed/xed-document-input-stream.c @@ -426,7 +426,7 @@ xed_document_input_stream_read (GInputStream *stream, do { - n = read_line (dstream, buffer + read, space_left); + n = read_line (dstream, (void *) ((gsize) buffer + read), space_left); read += n; space_left -= n; } while (space_left > 0 && n != 0 && dstream->priv->bytes_partial == 0); @@ -451,7 +451,7 @@ xed_document_input_stream_read (GInputStream *stream, newline = get_new_line (dstream); - memcpy (buffer + read, newline, newline_size); + memcpy ((void *) ((gsize) buffer + read), newline, newline_size); read += newline_size; dstream->priv->newline_added = TRUE; diff --git a/xed/xed-smart-charset-converter.c b/xed/xed-smart-charset-converter.c index 829f905..33b02f1 100644 --- a/xed/xed-smart-charset-converter.c +++ b/xed/xed-smart-charset-converter.c @@ -153,7 +153,7 @@ try_convert (GCharsetConverter *converter, do { res = g_converter_convert (G_CONVERTER (converter), - inbuf + nread, + (void *) ((gsize) inbuf + nread), inbuf_size - nread, out + nwritten, out_size - nwritten,