diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-17 08:24:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-17 09:33:23 +0000 |
commit | 046bface73b4a6a46788be36e30cc63a4f3b48f4 (patch) | |
tree | 696068581edcbcc7a942377ce679080cc439006f /main/mousepad | |
parent | 546f742f548335b6150f2ea8ad51c106048576b7 (diff) | |
download | aports-046bface73b4a6a46788be36e30cc63a4f3b48f4.tar.bz2 aports-046bface73b4a6a46788be36e30cc63a4f3b48f4.tar.xz |
main/mousepad: fix some runtime warnings
Diffstat (limited to 'main/mousepad')
-rw-r--r-- | main/mousepad/APKBUILD | 15 | ||||
-rw-r--r-- | main/mousepad/Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch | 84 |
2 files changed, 94 insertions, 5 deletions
diff --git a/main/mousepad/APKBUILD b/main/mousepad/APKBUILD index 0efa03c851..2c496f9750 100644 --- a/main/mousepad/APKBUILD +++ b/main/mousepad/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mousepad pkgver=0.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="Simple Text Editor for Xfce4" url="http://foo-projects.org/~benny/xfce/apps.html" arch="all" @@ -10,7 +10,9 @@ makedepends="gtk+2.0-dev gtksourceview2-dev" depends="desktop-file-utils" install="" subpackages="$pkgname-lang" -source="http://archive.xfce.org/src/apps/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2" +source="http://archive.xfce.org/src/apps/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2 + Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch + " _builddir="$srcdir"/$pkgname-$pkgver prepare() { @@ -38,6 +40,9 @@ package() { make DESTDIR="$pkgdir" install || return 1 } -md5sums="f55314c5dda6323883241e6cf01550a7 mousepad-0.4.0.tar.bz2" -sha256sums="60114431eac8db6bb6ce18bd38f1630cccb684375b97a445a1b6fd619848d132 mousepad-0.4.0.tar.bz2" -sha512sums="5196abd04268d1ace118dc485b72bfcfb7f9175eeaf52bc97c08c1646371d26401403a3bb199d882380bcb998547c65af9bd054f0365afd846c0ad74d3c3b1fe mousepad-0.4.0.tar.bz2" +md5sums="f55314c5dda6323883241e6cf01550a7 mousepad-0.4.0.tar.bz2 +b31ccd05bbfdaf185970e592be9ebd9e Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch" +sha256sums="60114431eac8db6bb6ce18bd38f1630cccb684375b97a445a1b6fd619848d132 mousepad-0.4.0.tar.bz2 +bccc5354e3eca83c608ab952188f4a47605d88cad7e2b48fa426f2057a122c9d Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch" +sha512sums="5196abd04268d1ace118dc485b72bfcfb7f9175eeaf52bc97c08c1646371d26401403a3bb199d882380bcb998547c65af9bd054f0365afd846c0ad74d3c3b1fe mousepad-0.4.0.tar.bz2 +886e2ff78d8a9083d71421fed8fdc8eea308da75bffb0f2eb6edd09c6606fc2a6706b0354a0f18191f3090e381d8885ea9961360c5cdcd959c4974959a176741 Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch" diff --git a/main/mousepad/Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch b/main/mousepad/Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch new file mode 100644 index 0000000000..60fe03c124 --- /dev/null +++ b/main/mousepad/Fixup-some-warnings-about-using-NULL-where-it-shoudnt-be.patch @@ -0,0 +1,84 @@ +From 73c93369f7708ab89c46e67e7933b835aafa6811 Mon Sep 17 00:00:00 2001 +From: Matthew Brush <matt@xfce.org> +Date: Wed, 8 Jul 2015 21:03:33 -0700 +Subject: Fixup some warnings about using NULL where it shouldn't be + +Closes #11663 + +diff --git a/mousepad/mousepad-action-group.c b/mousepad/mousepad-action-group.c +index 71b37f2..acea132 100644 +--- a/mousepad/mousepad-action-group.c ++++ b/mousepad/mousepad-action-group.c +@@ -283,7 +283,8 @@ void + mousepad_action_group_set_active_style_scheme (MousepadActionGroup *self, + GtkSourceStyleScheme *scheme) + { +- GtkAction *action; ++ GtkAction *action; ++ const gchar *scheme_name = NULL; + + g_return_if_fail (MOUSEPAD_IS_ACTION_GROUP (self)); + +@@ -303,8 +304,11 @@ mousepad_action_group_set_active_style_scheme (MousepadActionGroup *self, + self->locked = FALSE; + + /* update the setting when the active action is changed */ ++ if (scheme != NULL) ++ scheme_name = gtk_source_style_scheme_get_id(scheme); ++ + self->locked = TRUE; +- MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, gtk_source_style_scheme_get_id (scheme)); ++ MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, scheme_name); + self->locked = FALSE; + + g_object_notify (G_OBJECT (self), "active-style-scheme"); +diff --git a/mousepad/mousepad-settings.c b/mousepad/mousepad-settings.c +index 13cead5..4c2f5bc 100644 +--- a/mousepad/mousepad-settings.c ++++ b/mousepad/mousepad-settings.c +@@ -298,7 +298,7 @@ void + mousepad_setting_set_string (const gchar *path, + const gchar *value) + { +- mousepad_setting_set (path, "s", value); ++ mousepad_setting_set (path, "s", value != NULL ? value : ""); + } + + +diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c +index 8c3eba6..bd0e37c 100644 +--- a/mousepad/mousepad-view.c ++++ b/mousepad/mousepad-view.c +@@ -257,7 +257,8 @@ mousepad_view_buffer_changed (MousepadView *view, + GtkSourceStyleScheme *scheme; + + manager = gtk_source_style_scheme_manager_get_default (); +- scheme = gtk_source_style_scheme_manager_get_scheme (manager, view->color_scheme); ++ scheme = gtk_source_style_scheme_manager_get_scheme (manager, ++ view->color_scheme ? view->color_scheme : ""); + gtk_source_buffer_set_style_scheme (buffer, scheme); + + gtk_source_buffer_set_highlight_matching_brackets (buffer, view->match_braces); +diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c +index f1acc2b..adae7cd 100644 +--- a/mousepad/mousepad-window.c ++++ b/mousepad/mousepad-window.c +@@ -717,12 +717,13 @@ mousepad_window_action_group_style_scheme_changed (MousepadWindow *window, + MousepadActionGroup *group) + { + GtkSourceStyleScheme *scheme; +- const gchar *scheme_id; ++ const gchar *scheme_id = NULL; + gint npages, i; + + /* get the new active language */ + scheme = mousepad_action_group_get_active_style_scheme (group); +- scheme_id = gtk_source_style_scheme_get_id (scheme); ++ if (scheme != NULL) ++ scheme_id = gtk_source_style_scheme_get_id (scheme); + + /* update the color scheme on all the documents */ + npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook)); +-- +cgit v0.10.1 + |