- Add patches in order to fix warnings, when color scheme is not defined
- Bump PORTREVISION PR: 199181 Reported by: <admin@vladiom.com.ua> Obtained from: Xfce upstream repository
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= mousepad
|
||||
PORTVERSION= 0.4.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= editors xfce
|
||||
MASTER_SITES= XFCE/src/apps/${PORTNAME}/${PORTVERSION:R}
|
||||
DIST_SUBDIR= xfce4
|
||||
@@ -17,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
LIB_DEPENDS= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= desktop-file-utils gettext gmake libtool pkgconfig perl5 tar:bzip2
|
||||
USES= desktop-file-utils gettext gmake libtool perl5 pkgconfig tar:bzip2
|
||||
USE_GNOME= glib20 intltool intlhack
|
||||
|
||||
OPTIONS_DEFINE= GTK3
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
--- mousepad/mousepad-action-group.c.orig 2014-09-01 20:50:07 UTC
|
||||
+++ 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_s
|
||||
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");
|
||||
@@ -0,0 +1,11 @@
|
||||
--- mousepad/mousepad-settings.c.orig 2014-09-01 20:50:07 UTC
|
||||
+++ 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 : "");
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- mousepad/mousepad-view.c.orig 2014-09-01 20:50:07 UTC
|
||||
+++ mousepad/mousepad-view.c
|
||||
@@ -257,7 +257,8 @@ mousepad_view_buffer_changed (MousepadVi
|
||||
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);
|
||||
@@ -0,0 +1,18 @@
|
||||
--- mousepad/mousepad-window.c.orig 2014-09-01 20:58:02 UTC
|
||||
+++ mousepad/mousepad-window.c
|
||||
@@ -717,12 +717,13 @@ mousepad_window_action_group_style_schem
|
||||
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));
|
||||
Reference in New Issue
Block a user