Accepting request 424939 from GNOME:Next

Scripted push of project GNOME:Next

OBS-URL: https://build.opensuse.org/request/show/424939
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/gnote?expand=0&rev=86
This commit is contained in:
Dominique Leuenberger 2016-09-08 21:28:32 +00:00 committed by Git OBS Bridge
parent e0c6e23385
commit 5e6040a3d3
5 changed files with 313 additions and 15 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:75acffdc2c0cc8cd226dc4471e6624d523bbd86c415ef4e05be70cbbfd4014e7
size 3304760

3
gnote-3.21.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:81bfbb1a9e3ec4afa5e8c799031e20694e8ff5b188b529e24825be509b5d13c0
size 3307716

257
gnote-buildfix.patch Normal file
View File

@ -0,0 +1,257 @@
From 3c0e8258806a726fc5adeb115875587be53bc77e Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Wed, 31 Aug 2016 20:59:46 +0200
Subject: [PATCH] Fix build
has_buffer and is_loaded both expect to return a bool, so returning
plain m_buffer won't cut it
Fixes build error
[ 89s] In file included from ../../../src/noteaddin.hpp:38:0,
[ 89s] from backlinksnoteaddin.hpp:27,
[ 89s] from backlinksnoteaddin.cpp:25:
[ 89s] ../../../src/note.hpp: In member function 'bool gnote::Note::has_buffer() const':
[ 89s] ../../../src/note.hpp:127:14: error: cannot convert 'const Glib::RefPtr<gnote::NoteBuffer>' to 'bool' in return
[ 89s] return m_buffer;
[ 89s] ^~~~~~~~
[ 89s] ../../../src/note.hpp: In member function 'bool gnote::Note::is_loaded() const':
[ 89s] ../../../src/note.hpp:142:23: error: cannot convert 'const Glib::RefPtr<gnote::NoteBuffer>' to 'bool' in return
[ 89s] return (m_buffer);
https://bugzilla.gnome.org/show_bug.cgi?id=770541
---
src/actionmanager.cpp | 6 +++---
src/addins/exporttogtg/exporttogtgnoteaddin.cpp | 6 +++---
src/addins/printnotes/printnotesnoteaddin.cpp | 2 +-
src/addins/todo/todonoteaddin.cpp | 2 +-
src/dbus/searchprovider.cpp | 2 +-
src/note.hpp | 4 ++--
src/notebuffer.cpp | 6 +++---
src/notetag.cpp | 2 +-
src/notewindow.cpp | 4 ++--
src/remotecontrolproxy.cpp | 2 +-
src/searchnoteswidget.cpp | 2 +-
src/synchronization/gnotesyncclient.cpp | 2 +-
12 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 2bc6f42..bdd5d48 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -144,17 +144,17 @@ namespace gnote {
int pos = 0;
Glib::RefPtr<Gio::Menu> section = make_app_menu_section(APP_ACTION_NEW);
- if(section != 0) {
+ if(section) {
menu->insert_section(pos++, section);
}
section = make_app_menu_section(APP_ACTION_MANAGE);
- if(section != 0) {
+ if(section) {
menu->insert_section(pos++, section);
}
section = make_app_menu_section(APP_ACTION_LAST);
- if(section != 0) {
+ if(section) {
menu->insert_section(pos++, section);
}
diff --git a/src/addins/exporttogtg/exporttogtgnoteaddin.cpp b/src/addins/exporttogtg/exporttogtgnoteaddin.cpp
index 871f001..d6a8662 100644
--- a/src/addins/exporttogtg/exporttogtgnoteaddin.cpp
+++ b/src/addins/exporttogtg/exporttogtgnoteaddin.cpp
@@ -84,10 +84,10 @@ std::map<int, Gtk::Widget*> ExportToGTGNoteAddin::get_actions_popover_widgets()
void ExportToGTGNoteAddin::export_button_clicked(const Glib::VariantBase&)
{
try {
- if (s_gtg_interface == 0) {
+ if (!s_gtg_interface) {
Glib::RefPtr<Gio::DBus::NodeInfo> node_info = Gio::DBus::NodeInfo::create_for_xml(GTG_INTERFACE);
s_gtg_interface = node_info->lookup_interface("org.gnome.GTG");
- if(s_gtg_interface == 0) {
+ if(!s_gtg_interface) {
ERR_OUT(_("GTG XML loaded, but interface not found"));
return;
}
@@ -101,7 +101,7 @@ void ExportToGTGNoteAddin::export_button_clicked(const Glib::VariantBase&)
try {
Glib::RefPtr<Gio::DBus::Proxy> proxy = Gio::DBus::Proxy::create_for_bus_sync(
Gio::DBus::BUS_TYPE_SESSION, "org.gnome.GTG", "/org/gnome/GTG", "org.gnome.GTG", s_gtg_interface);
- if(proxy == 0) {
+ if(!proxy) {
ERR_OUT(_("Failed to create D-Bus proxy for GTG"));
return;
}
diff --git a/src/addins/printnotes/printnotesnoteaddin.cpp b/src/addins/printnotes/printnotesnoteaddin.cpp
index 36d07df..624adfe 100644
--- a/src/addins/printnotes/printnotesnoteaddin.cpp
+++ b/src/addins/printnotes/printnotesnoteaddin.cpp
@@ -254,7 +254,7 @@ namespace printnotes {
}
gnote::DepthNoteTag::Ptr depth = get_buffer()->find_depth_tag(p_start);
- if(depth != 0) {
+ if(depth) {
indentation += ((int) (dpiX / 3)) * depth->get_depth();
}
layout->set_width(pango_units_from_double((int)context->get_width() -
diff --git a/src/addins/todo/todonoteaddin.cpp b/src/addins/todo/todonoteaddin.cpp
index 71803c1..79b415a 100644
--- a/src/addins/todo/todonoteaddin.cpp
+++ b/src/addins/todo/todonoteaddin.cpp
@@ -42,7 +42,7 @@ TodoModule::TodoModule()
void Todo::initialize()
{
FOREACH(const std::string & s, s_todo_patterns) {
- if(get_note()->get_tag_table()->lookup(s) == 0) {
+ if(!get_note()->get_tag_table()->lookup(s)) {
Glib::RefPtr<Gtk::TextTag> tag = Gtk::TextTag::create(s);
tag->property_foreground() = "#0080f0";
tag->property_weight() = PANGO_WEIGHT_BOLD;
diff --git a/src/dbus/searchprovider.cpp b/src/dbus/searchprovider.cpp
index 28e2658..9328eea 100644
--- a/src/dbus/searchprovider.cpp
+++ b/src/dbus/searchprovider.cpp
@@ -228,7 +228,7 @@ Glib::VariantContainerBase SearchProvider::LaunchSearch_stub(const Glib::Variant
gchar *SearchProvider::get_icon()
{
- if(m_note_icon == 0) {
+ if(!m_note_icon) {
Gtk::IconInfo info = gnote::IconManager::obj().lookup_icon(gnote::IconManager::NOTE, 48);
m_note_icon = Gio::Icon::create(info.get_filename());
}
diff --git a/src/note.hpp b/src/note.hpp
index fc960c1..864c47b 100644
--- a/src/note.hpp
+++ b/src/note.hpp
@@ -124,7 +124,7 @@ public:
const Glib::RefPtr<NoteTagTable> & get_tag_table();
bool has_buffer() const
{
- return m_buffer;
+ return (bool)m_buffer;
}
const Glib::RefPtr<NoteBuffer> & get_buffer();
bool has_window() const
@@ -139,7 +139,7 @@ public:
bool is_special() const;
bool is_loaded() const
{
- return (m_buffer);
+ return (bool)m_buffer;
}
bool is_opened() const
{
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index 0192259..107fdb3 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -265,7 +265,7 @@ namespace gnote {
Glib::RefPtr<Gtk::TextTag> depth = find_depth_tag(iter);
- return depth;
+ return (bool)depth;
}
@@ -1358,7 +1358,7 @@ namespace gnote {
if (iter.get_line() < buffer->get_line_count() - 1) {
Gtk::TextIter next_line = buffer->get_iter_at_line(iter.get_line()+1);
next_line_has_depth =
- NoteBuffer::Ptr::cast_static(buffer)->find_depth_tag (next_line);
+ (bool)NoteBuffer::Ptr::cast_static(buffer)->find_depth_tag (next_line);
}
bool at_empty_line = iter.ends_line () && iter.starts_line ();
@@ -1593,7 +1593,7 @@ namespace gnote {
NoteBuffer::Ptr note_buffer = NoteBuffer::Ptr::cast_dynamic(buffer);
// Do not insert bullet if it's already there
// this happens when using double identation in bullet list
- if(note_buffer->find_depth_tag(apply_start) == 0) {
+ if(!note_buffer->find_depth_tag(apply_start)) {
note_buffer->insert_bullet (apply_start, depth_tag->get_depth(), depth_tag->get_direction());
buffer->remove_all_tags (apply_start, apply_start);
offset += 2;
diff --git a/src/notetag.cpp b/src/notetag.cpp
index d67345a..d69217f 100644
--- a/src/notetag.cpp
+++ b/src/notetag.cpp
@@ -523,7 +523,7 @@ namespace gnote {
bool NoteTagTable::tag_has_depth(const Glib::RefPtr<Gtk::TextBuffer::Tag> & tag)
{
- return DepthNoteTag::Ptr::cast_dynamic(tag);
+ return (bool)DepthNoteTag::Ptr::cast_dynamic(tag);
}
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index bc09b36..998d76a 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -204,7 +204,7 @@ namespace gnote {
return;
}
remove_accel_group(*parent);
- if(parent->get_window() != 0
+ if(parent->get_window()
&& (parent->get_window()->get_state() & Gdk::WINDOW_STATE_MAXIMIZED) == 0) {
int cur_width, cur_height;
parent->get_size(cur_width, cur_height);
@@ -607,7 +607,7 @@ namespace gnote {
m_global_keys->enabled(m_enabled);
FOREACH(const MainWindowAction::Ptr & action, get_widget_actions()) {
// A list includes empty actions to mark separators, non-modifying actions are always enabled
- if(action != 0 && Glib::RefPtr<NonModifyingNoteAction>::cast_dynamic(action) == 0) {
+ if(action && !Glib::RefPtr<NonModifyingNoteAction>::cast_dynamic(action)) {
action->set_enabled(enable);
}
}
diff --git a/src/remotecontrolproxy.cpp b/src/remotecontrolproxy.cpp
index aab810f..b13e1ed 100644
--- a/src/remotecontrolproxy.cpp
+++ b/src/remotecontrolproxy.cpp
@@ -35,7 +35,7 @@ namespace {
void load_interface_from_file(const char *filename, const char *interface_name,
Glib::RefPtr<Gio::DBus::InterfaceInfo> & interface)
{
- if(interface != 0) {
+ if(interface) {
return;
}
std::ifstream fin(filename);
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 2b68a6b..2100846 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -1536,7 +1536,7 @@ void SearchNotesWidget::parse_sorting_setting(const Glib::ustring & sorting)
void SearchNotesWidget::on_rename_notebook()
{
Glib::RefPtr<Gtk::TreeSelection> selection = m_notebooksTree->get_selection();
- if(selection == 0) {
+ if(!selection) {
return;
}
std::vector<Gtk::TreeModel::Path> selected_row = selection->get_selected_rows();
diff --git a/src/synchronization/gnotesyncclient.cpp b/src/synchronization/gnotesyncclient.cpp
index 66b82cb..ee216eb 100644
--- a/src/synchronization/gnotesyncclient.cpp
+++ b/src/synchronization/gnotesyncclient.cpp
@@ -54,7 +54,7 @@ namespace sync {
{
m_local_manifest_file_path = Glib::build_filename(IGnote::conf_dir(), LOCAL_MANIFEST_FILE_NAME);
Glib::RefPtr<Gio::File> manifest = Gio::File::create_for_path(m_local_manifest_file_path);
- if(manifest != 0) {
+ if(manifest) {
m_file_watcher = manifest->monitor_file();
m_file_watcher->signal_changed()
.connect(sigc::mem_fun(*this, &GnoteSyncClient::on_changed));
--
2.9.3

View File

@ -1,3 +1,40 @@
-------------------------------------------------------------------
Wed Aug 31 19:01:22 UTC 2016 - dimstar@opensuse.org
- Add gnote-buildfix.patch: Fix build.
-------------------------------------------------------------------
Fri Aug 26 18:23:45 UTC 2016 - dimstar@opensuse.org
- Update to version 3.21.0:
+ New Features:
- GTK+ 3.20 is required.
- Undo will now undo last user action as single unit
(bgo#747202).
- Added shortcuts window.
- Added <Ctrl>Left accelerator to go from note to main window.
+ Fixes:
- Enter key will find next match when searching in note
(bgo#700624).
- Fixed formatting buttons when selection is mixed formatting
(bgo#702248).
- Fixed crash on first run when data migration is required
(bgo#765791).
- Fixed disabling application plugins.
- Fixed Windows size shrinking when switching from/to note
(bgo#764464).
- Fixed tab key activating search, while it shouldn't
(bgo#767834).
- Escape will close search when search entry has focus.
- Make --search always show main window in search mode
(bgo#769906).
+ Updated translations.
- Align BuildRequires with what configure checks for:
+ Removed gtkmm3-devel, libuuid-devel and libxslt-devel.
+ Added pkgconfig(glibmm-2.4), pkgconfig(gtk+-3.0),
pkgconfig(gtkmm-3.0), pkgconfig(libxslt) and pkgconfig(uuid).
- Bump _gnote_version to 3.21.
-------------------------------------------------------------------
Thu May 19 04:16:43 UTC 2016 - tyang@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package gnote
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,29 +16,33 @@
#
%define _gnote_version 3.20
%define _gnote_version 3.21
Name: gnote
Version: 3.20.1
Version: 3.21.0
Release: 0
Summary: A Port of Tomboy to C++
License: GPL-3.0+
Group: Productivity/Text/Editors
Url: http://live.gnome.org/Gnote
Source: http://download.gnome.org/sources/gnote/3.20/%{name}-%{version}.tar.xz
Source: http://download.gnome.org/sources/gnote/3.21/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gnote-buildfix.patch bgo#770541 dimstar@opensuse.org -- Fix build
Patch0: gnote-buildfix.patch
BuildRequires: boost-devel >= 1.34
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gtkmm3-devel >= 3.18
BuildRequires: intltool
BuildRequires: libuuid-devel
BuildRequires: libxslt-devel
BuildRequires: pkgconfig
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: yelp-tools
BuildRequires: pkgconfig(glibmm-2.4) >= 2.32
BuildRequires: pkgconfig(gtk+-3.0) >= 3.20
BuildRequires: pkgconfig(gtkmm-3.0) >= 3.18
BuildRequires: pkgconfig(gtkspell3-3.0) >= 3.0.0
BuildRequires: pkgconfig(libsecret-1) >= 0.8
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(uuid)
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires
@ -62,8 +66,10 @@ This package contains a search provider to enable GNOME Shell to get
search results from documents.
%lang_package
%prep
%setup -q
%patch0 -p1
translation-update-upstream
%build
@ -72,14 +78,11 @@ make %{?_smp_mflags}
%install
%make_install
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file gnote Utility DesktopUtility
%fdupes %{buildroot}
%find_lang %{name} %{?no_lang_C}
%clean
test %{buildroot} != "/" && rm -rf %{buildroot}
%post
/sbin/ldconfig
%glib2_gsettings_schema_post
@ -109,6 +112,7 @@ test %{buildroot} != "/" && rm -rf %{buildroot}
%{_datadir}/appdata/gnote.appdata.xml
%files lang -f %{name}.lang
%defattr(-,root,root)
%files -n gnome-shell-search-provider-%{name}
%defattr(-,root,root)