[gnote] Replace std::string by Glib::ustring in StickyNoteImport
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in StickyNoteImport
- Date: Sun, 12 Feb 2017 15:15:25 +0000 (UTC)
commit eb36d103216f09252a04bdd482c374a2a69357bd
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Feb 12 16:29:15 2017 +0200
Replace std::string by Glib::ustring in StickyNoteImport
.../stickynoteimport/stickynoteimportnoteaddin.cpp | 12 ++++++------
.../stickynoteimport/stickynoteimportnoteaddin.hpp | 10 ++++------
2 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
index 22652fa..e198804 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
@@ -63,7 +63,7 @@ static const char * PREFS_FILE = "stickynoteimport.ini";
bool StickyNoteImportNoteAddin::s_static_inited = false;
bool StickyNoteImportNoteAddin::s_sticky_file_might_exist = true;
bool StickyNoteImportNoteAddin::s_sticky_file_existence_confirmed = false;
-std::string StickyNoteImportNoteAddin::s_sticky_xml_path;
+Glib::ustring StickyNoteImportNoteAddin::s_sticky_xml_path;
void StickyNoteImportNoteAddin::_init_static()
@@ -109,7 +109,7 @@ void StickyNoteImportNoteAddin::shutdown()
bool StickyNoteImportNoteAddin::want_to_run(gnote::NoteManager & manager)
{
bool want_run = false;
- std::string prefs_file =
+ Glib::ustring prefs_file =
Glib::build_filename(manager.get_addin_manager().get_prefs_dir(),
PREFS_FILE);
@@ -132,7 +132,7 @@ bool StickyNoteImportNoteAddin::want_to_run(gnote::NoteManager & manager)
bool StickyNoteImportNoteAddin::first_run(gnote::NoteManager & manager)
{
- std::string prefs_file(Glib::build_filename(
+ Glib::ustring prefs_file(Glib::build_filename(
manager.get_addin_manager().get_prefs_dir(),
PREFS_FILE));
@@ -206,7 +206,7 @@ void StickyNoteImportNoteAddin::import_button_clicked(gnote::NoteManager & manag
}
-void StickyNoteImportNoteAddin::show_no_sticky_xml_dialog(const std::string & xml_path)
+void StickyNoteImportNoteAddin::show_no_sticky_xml_dialog(const Glib::ustring & xml_path)
{
show_message_dialog (
_("No Sticky Notes found"),
@@ -305,8 +305,8 @@ bool StickyNoteImportNoteAddin::create_note_from_sticky(const char * stickyTitle
}
-void StickyNoteImportNoteAddin::show_message_dialog(const std::string & title,
- const std::string & message,
+void StickyNoteImportNoteAddin::show_message_dialog(const Glib::ustring & title,
+ const Glib::ustring & message,
Gtk::MessageType messageType)
{
gnote::utils::HIGMessageDialog dialog(NULL,
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
index bf715d5..acb4946 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2010,2013 Aurimas Cernius
+ * Copyright (C) 2010,2013,2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -21,8 +21,6 @@
#ifndef __STICKYNOTE_IMPORT_NOTE_ADDIN_HPP_
#define __STICKYNOTE_IMPORT_NOTE_ADDIN_HPP_
-#include <string>
-
#include <libxml/tree.h>
#include <gtkmm/imagemenuitem.h>
@@ -69,12 +67,12 @@ private:
void check_for_first_run(gnote::NoteManager & manager);
xmlDocPtr get_sticky_xml_doc();
void import_button_clicked(gnote::NoteManager & manager);
- void show_no_sticky_xml_dialog(const std::string & xml_path);
+ void show_no_sticky_xml_dialog(const Glib::ustring & xml_path);
void show_results_dialog(int numNotesImported, int numNotesTotal);
void import_notes(xmlDocPtr xml_doc, bool showResultsDialog, gnote::NoteManager & manager);
bool create_note_from_sticky(const char * stickyTitle, const char* content,
gnote::NoteManager & manager);
- void show_message_dialog(const std::string & title, const std::string & message,
+ void show_message_dialog(const Glib::ustring & title, const Glib::ustring & message,
Gtk::MessageType messageType);
Gtk::ImageMenuItem *m_item;
@@ -83,7 +81,7 @@ private:
static bool s_static_inited;
static bool s_sticky_file_might_exist;
static bool s_sticky_file_existence_confirmed;
- static std::string s_sticky_xml_path;
+ static Glib::ustring s_sticky_xml_path;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]