[gnote] Drop support for panel applet
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Drop support for panel applet
- Date: Sat, 23 Jun 2012 12:33:25 +0000 (UTC)
commit ac7de238515177f7ae6c5bbe0491107ce9d5f954
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Tue Jun 19 19:57:20 2012 +0300
Drop support for panel applet
configure.ac | 22 -
data/GNOME_GnoteApplet.xml | 3 -
data/Makefile.am | 30 +--
data/org.gnome.gnote.panel-applet.in.in | 16 -
...nome.panel.applet.GnoteAppletFactory.service.in | 3 -
src/Makefile.am | 17 -
src/applet.cpp | 439 --------------------
src/applet.hpp | 37 --
src/gnote-applet.in | 3 -
src/gnote.cpp | 69 +---
src/gnote.hpp | 12 +-
11 files changed, 20 insertions(+), 631 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6fc81e1..153bc1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,6 @@ dnl if one is harcoded elsewhere, it is a bug
GTK_VERSION=3.0
LIBGLIBMM_VERSION=2.28
LIBGTKMM_VERSION=3.0
-LIBPANELAPPLET_VERSION=3.0
GTKSPELL_VERSION=2.0.9
BOOST_VERSION=1.34
GNOME_KEYRING_VERSION=3.0
@@ -81,26 +80,6 @@ PKG_CHECK_MODULES(LIBXSLT, [libxslt])
PKG_CHECK_MODULES(PCRE, [libpcrecpp])
PKG_CHECK_MODULES(UUID, [uuid])
-AC_ARG_ENABLE([applet],
- AS_HELP_STRING([--enable-applet],[Enable panel applet]),
- [],[enable_applet=no])
-
-if test $enable_applet = "yes"; then
- PKG_CHECK_EXISTS(libpanelapplet-4.0 >= $LIBPANELAPPLET_VERSION,
- [
- AC_DEFINE(HAVE_PANELAPPLET, 1, [Define to 1 if panelapplet is available])
- have_panelapplet="yes"
- PKG_CHECK_MODULES(LIBPANELAPPLET, [libpanelapplet-4.0 >= $LIBPANELAPPLET_VERSION])
- ], [
- have_panelapplet="no"]
- )
-else
- have_panelapplet="no"
-fi
-
-AM_CONDITIONAL(HAVE_PANELAPPLET, test $have_panelapplet = "yes")
-AC_SUBST(PANELAPPLET_SERVER_DIR)
-
#GtkSpell disabled until GTK 3.0 is supported
#
# Check for recent GtkSpell here. Prior versions require bug workarounds.
@@ -216,6 +195,5 @@ echo "
Options:
Spellchecking support: ${FIXED_GTKSPELL}
- GNOME Panel Applet support: ${have_panelapplet}
"
diff --git a/data/Makefile.am b/data/Makefile.am
index e96dc54..f7747b2 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -29,36 +29,13 @@ $(dbusservice_DATA): $(dbusservice_in_files) Makefile
-e "s|\ wrapper\@|gnote|g" \
< $< > $@
-if HAVE_PANELAPPLET
-appletdir = $(datadir)/gnome-panel/4.0/applets
-applet_in_files = org.gnome.gnote.panel-applet.in
-applet_in_in_files = $(applet_in_files).in
-applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet)
-
-$(applet_in_files): $(applet_in_files).in Makefile
- $(AM_V_GEN)sed -e "s|\ LIBEXECDIR\@|$(libexecdir)|" \
- -e "s|\ VERSION\@|$(PACKAGE_VERSION)|" \
- $< > $@
-
- INTLTOOL_SERVER_RULE@
-%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-servicedir = $(datadir)/dbus-1/services
-service_in_files = org.gnome.panel.applet.GnoteAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.GnoteAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed -e "s|\ LIBEXECDIR\@|$(libexecdir)|" $< > $@
-endif
-
@INTLTOOL_SERVER_RULE@
man_MANS = gnote.1
gnotedatadir = @datadir@/gnote
-gnotedata_DATA = UIManagerLayout.xml \
- GNOME_GnoteApplet.xml
+gnotedata_DATA = UIManagerLayout.xml
noinst_DATA =
@@ -71,15 +48,10 @@ EXTRA_DIST = \
org.gnome.gnote.gschema.xml.in \
$(man_MANS) \
$(noinst_DATA) \
- $(service_in_files) \
- $(applet_in_in_files) \
$(dbusservice_in_files)
DISTCLEANFILES = \
$(desktop_files) \
$(pkgconfig_DATA) \
- $(applet_DATA) \
- $(applet_DATA).in \
- $(service_DATA) \
$(dbusservice_DATA) \
$(gsettings_SCHEMAS)
diff --git a/src/Makefile.am b/src/Makefile.am
index bbfe566..2136f97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,8 +2,6 @@
SUBDIRS = addins
-EXTRA_DIST = gnote-applet.in
-
INCLUDES = -I$(top_srcdir)
AM_CPPFLAGS= LIBGTKMM_CFLAGS@ @LIBGLIBMM_CFLAGS@ \
@GTK_CFLAGS@ \
@@ -59,20 +57,6 @@ notetest_SOURCES = test/notetest.cpp
notetest_LDADD = $(GNOTE_LIBS) -lX11
-if HAVE_PANELAPPLET
-APPLET_SOURCES=applet.hpp applet.cpp
-AM_CPPFLAGS+= LIBPANELAPPLET_CFLAGS@
-LIBGNOTE_LIBS+= LIBPANELAPPLET_LIBS@
-
-libexec_SCRIPTS=gnote-applet
-gnote-applet: gnote-applet.in Makefile
- sed -e "s|\ bindir\@|$(bindir)|g" \
- < $< > $@
-
-CLEANFILES = gnote-applet
-endif
-
-
SUBDIRS += dbus
DBUS_SOURCES=remotecontrolproxy.hpp remotecontrolproxy.cpp \
dbus/remotecontrol.hpp dbus/remotecontrol.cpp \
@@ -171,7 +155,6 @@ libgnote_la_SOURCES = \
synchronization/syncutils.hpp synchronization/syncutils.cpp \
synchronization/syncserviceaddin.hpp synchronization/syncserviceaddin.cpp \
$(DBUS_SOURCES) \
- $(APPLET_SOURCES) \
$(NULL)
diff --git a/src/gnote.cpp b/src/gnote.cpp
index c0b0a81..483e0f1 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -35,10 +35,6 @@
#include <gtkmm/main.h>
#include <gtkmm/aboutdialog.h>
-#if HAVE_PANELAPPLET
-#include <panel-applet.h>
-#endif
-
#include "gnote.hpp"
#include "actionmanager.hpp"
#include "addinmanager.hpp"
@@ -57,10 +53,6 @@
#include "sharp/files.hpp"
#include "synchronization/syncmanager.hpp"
-#if HAVE_PANELAPPLET
-#include "applet.hpp"
-#endif
-
namespace gnote {
@@ -113,7 +105,6 @@ namespace gnote {
Gnote::Gnote()
: m_manager(NULL)
, m_keybinder(NULL)
- , m_is_panel_applet(false)
, m_is_background(false)
, m_prefsdlg(NULL)
, m_app(NULL)
@@ -136,10 +127,6 @@ namespace gnote {
handle = true;
break;
}
- else if(!strcmp(argv[i], "--panel-applet")) {
- m_is_panel_applet = true;
- break;
- }
}
if(handle) {
@@ -148,22 +135,10 @@ namespace gnote {
return 0;
}
- if(m_is_panel_applet) {
-#if HAVE_PANELAPPLET
- common_init();
- ActionManager & am(ActionManager::obj());
- am["CloseWindowAction"]->set_visible(true);
- am["QuitGNoteAction"]->set_visible(false);
- register_remote_control(*m_manager, sigc::mem_fun(*this, &Gnote::end_main));
- panel::register_applet();
-#endif
- }
- else {
- m_app = gnote_app_new();
- g_application_run(G_APPLICATION(m_app), argc, argv);
- g_object_unref(m_app);
- m_app = NULL;
- }
+ m_app = gnote_app_new();
+ g_application_run(G_APPLICATION(m_app), argc, argv);
+ g_object_unref(m_app);
+ m_app = NULL;
signal_quit();
return 0;
}
@@ -246,30 +221,26 @@ namespace gnote {
}
}
- if(!m_is_panel_applet) {
- Glib::RefPtr<Gio::Settings> settings = Preferences::obj()
- .get_schema_settings(Preferences::SCHEMA_GNOTE);
- if(settings->get_boolean(Preferences::USE_STATUS_ICON)) {
- DBG_OUT("starting tray icon");
- start_tray_icon();
- }
- else if(m_is_background) {
- // Create Search All Notes window as we need it present for application to run
- NoteRecentChanges::get_instance(default_note_manager());
- }
- else {
- am["ShowSearchAllNotesAction"]->activate();
- }
+ Glib::RefPtr<Gio::Settings> settings = Preferences::obj()
+ .get_schema_settings(Preferences::SCHEMA_GNOTE);
+ if(settings->get_boolean(Preferences::USE_STATUS_ICON)) {
+ DBG_OUT("starting tray icon");
+ start_tray_icon();
+ }
+ else if(m_is_background) {
+ // Create Search All Notes window as we need it present for application to run
+ NoteRecentChanges::get_instance(default_note_manager());
+ }
+ else {
+ am["ShowSearchAllNotesAction"]->activate();
}
}
void Gnote::start_note_created(const Note::Ptr & start_note)
{
- DBG_OUT("we will show the start note: %d", !is_panel_applet());
- if(!is_panel_applet()) {
- start_note->get_window()->show();
- }
+ DBG_OUT("we will show the start note");
+ start_note->get_window()->show();
}
std::string Gnote::get_note_path(const std::string & override_path)
@@ -377,9 +348,6 @@ namespace gnote {
void Gnote::on_quit_gnote_action()
{
- if(m_is_panel_applet) {
- return;
- }
#ifdef HAVE_GLIB_2_32
g_application_quit(G_APPLICATION(m_app));
#else
@@ -551,7 +519,6 @@ namespace gnote {
{
static const GOptionEntry entries[] =
{
- { "panel-applet", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &m_use_panel, _("Run Gnote as a GNOME panel applet."), NULL },
{ "background", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &m_background, _("Run Gnote in background."), NULL },
{ "note-path", 0, 0, G_OPTION_ARG_STRING, &m_note_path, _("Specify the path of the directory containing the notes."), _("path") },
{ "search", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, (void*)GnoteCommandLine::parse_func, _("Open the search all notes window with the search text."), _("text") },
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 54dbd84..459be3d 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -59,10 +59,6 @@ public:
}
bool needs_execute() const;
bool needs_immediate_execute() const;
- bool use_panel_applet() const
- {
- return m_use_panel;
- }
bool background()
{
return m_background;
@@ -141,12 +137,7 @@ public:
bool tray_icon_showing()
{
- return m_is_panel_applet
- || (m_tray_icon && m_tray_icon->is_embedded() && m_tray_icon->get_visible());
- }
- bool is_panel_applet()
- {
- return m_is_panel_applet;
+ return m_tray_icon && m_tray_icon->is_embedded() && m_tray_icon->get_visible();
}
bool is_background() const
{
@@ -180,7 +171,6 @@ private:
Glib::RefPtr<Gtk::IconTheme> m_icon_theme;
Glib::RefPtr<TrayIcon> m_tray_icon;
Tray::Ptr m_tray;
- bool m_is_panel_applet;
bool m_is_background;
PreferencesDialog *m_prefsdlg;
GnoteCommandLine cmd_line;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]