[pan2] * removed help * bugfix for saving prefs * enable gtkspell3 build with gtk3
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] * removed help * bugfix for saving prefs * enable gtkspell3 build with gtk3
- Date: Wed, 4 Apr 2012 18:40:53 +0000 (UTC)
commit b1e2202c440fc5d9795df03d7769c7b08cc1f364
Author: Heinrich MÃller <henmull src gnome org>
Date: Wed Apr 4 19:37:38 2012 +0200
* removed help
* bugfix for saving prefs
* enable gtkspell3 build with gtk3
.gitignore | 1 -
Makefile.am | 12 -
configure.in | 60 +-
help/C/figures/pan_window.png | Bin 120407 -> 0 bytes
help/C/legal.xml | 76 --
help/C/pan.xml | 2118 -----------------------------------
help/Changelog | 4 -
help/Makefile.am | 9 -
help/de/de.po | 2415 ----------------------------------------
help/es/es.po | 2467 -----------------------------------------
help/pan.omf.in | 11 -
pan.cbp | 3 -
pan/data-impl/data-io.cc | 2 +-
pan/gui/actions.cc | 6 -
pan/gui/gui.cc | 34 +-
pan/gui/gui.h | 1 -
pan/gui/header-pane.cc | 13 +-
pan/gui/pan-ui.h | 1 -
pan/gui/pan.ui.h | 1 -
pan/gui/pan.ui.ssl.h | 1 -
20 files changed, 54 insertions(+), 7181 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e8be7ae..e68719a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,6 @@ depcomp
.deps
gnome-doc-utils.m4
gnome-doc-utils.make
-help/*.omf
INSTALL
install-sh
intltool-*
diff --git a/Makefile.am b/Makefile.am
index 8b13f50..da115f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,5 @@
SUBDIRS = po uulib pan
-if ENABLE_HELP
-SUBDIRS += help
-endif
-
@INTLTOOL_DESKTOP_RULE@
DESKTOP_IN_FILES=pan.desktop.in
@@ -15,10 +11,6 @@ DISTCLEANFILES = \
$(srcdir)/intltool-update \
$(srcdir)/pan.desktop
-if ENABLE_HELP
-DISTCLEANFILES += $(srcdir)/gnome-doc-utils.make
-endif
-
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
@@ -47,10 +39,6 @@ EXTRA_DIST = \
intltool-extract.in intltool-merge.in intltool-update.in \
pan_git_rev
-if ENABLE_HELP
-EXTRA_DIST += gnome-doc-utils.make
-endif
-
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper"
Productivitydir = $(datadir)/applications
diff --git a/configure.in b/configure.in
index bed2cf8..cb889d9 100644
--- a/configure.in
+++ b/configure.in
@@ -38,8 +38,6 @@ AC_CONFIG_SRCDIR(pan/general/quark.cc)
AM_INIT_AUTOMAKE([1.11.1 tar-ustar dist-bzip2])
AM_MAINTAINER_MODE([enable])
-GNOME_DOC_INIT
-
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
dnl glib, gmime, and gtk are mandatory prerequisites.
@@ -49,6 +47,7 @@ GMIME26_REQUIRED=2.5.5
GTK_REQUIRED=2.16.0
GTK3_REQUIRED=3.0.0
GTKSPELL_REQUIRED=2.0.7
+GTKSPELL3_REQUIRED=2.0.16
ENCHANT_REQUIRED=1.6.0
GNUTLS_REQUIRED=2.12.10
LIBNOTIFY_REQUIRED=0.4.1
@@ -105,15 +104,6 @@ if test "x$want_gmime_crypto" = "xyes" ; then
fi
fi
-dnl User help support
-AC_ARG_WITH(gnome-doc-help, AS_HELP_STRING([--with-gnome-doc-help],[enable support for user help (gnome-doc-utils)]),[want_gnome_doc_help=$withval], [want_gnome_doc_help=yes])
-if test "x$want_gnome_doc_help" = "xyes" ; then
- AC_DEFINE(HAVE_HELP,[1], [user help in Pan (with gnome-doc-utils)])
- AM_CONDITIONAL(ENABLE_HELP, true)
-else
- AM_CONDITIONAL(ENABLE_HELP, false)
-fi
-
dnl D-Bus support
AC_ARG_WITH(dbus, AS_HELP_STRING([--with-dbus],[enable D-Bus support]), [want_dbus=$withval], [want_dbus=yes])
if test "x$want_dbus" = "xyes" ; then
@@ -123,19 +113,7 @@ fi
dnl GtkSpell support
gtkspell_msg=no
AC_ARG_WITH(gtkspell, AS_HELP_STRING([--with-gtkspell],[enable GtkSpell support]), [want_gtkspell=$withval], [want_gtkspell=yes])
-if test "x$want_gtkspell" = "xyes" ; then
- PKG_CHECK_MODULES([GTKSPELL], [gtkspell-2.0 >= $GTKSPELL_REQUIRED enchant >= $ENCHANT_REQUIRED],
- [
- gtkspell_msg=yes
- AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
- ],
- [
- gtkspell_msg=no
- AC_MSG_RESULT(no)
- ])
-fi
-AC_SUBST(ENCHANT_CFLAGS)
-AC_SUBST(ENCHANT_LIBS)
+
dnl GTK+ 3 support
gtk_msg=no
@@ -145,10 +123,36 @@ if test "x$want_gtk3" = "xyes" ; then
[gtk_msg="yes >= $GTK3_REQUIRED"
AC_DEFINE(HAVE_GTK,[1],[GTK+ 3 support])]
)
+ if test "x$want_gtkspell" = "xyes" ; then
+ PKG_CHECK_MODULES([GTKSPELL], [gtkspell3-2.0 >= $GTKSPELL3_REQUIRED enchant >= $ENCHANT_REQUIRED],
+ [
+ gtkspell_msg=yes
+ AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
+ ],
+ [
+ gtkspell_msg=no
+ AC_MSG_RESULT(no)
+ ])
+ fi
+
else
+ if test "x$want_gtkspell" = "xyes" ; then
+ PKG_CHECK_MODULES([GTKSPELL], [gtkspell-2.0 >= $GTKSPELL_REQUIRED enchant >= $ENCHANT_REQUIRED],
+ [
+ gtkspell_msg=yes
+ AC_DEFINE(HAVE_GTKSPELL,[1],[GtkSpell support for spellchecking])
+ ],
+ [
+ gtkspell_msg=no
+ AC_MSG_RESULT(no)
+ ])
+ fi
AM_PATH_GTK_2_0($GTK_REQUIRED,,exit 1,gthread)
fi
+AC_SUBST(ENCHANT_CFLAGS)
+AC_SUBST(ENCHANT_LIBS)
+
dnl GnuTLS support
gnutls_msg=no
AC_ARG_WITH(gnutls, AS_HELP_STRING([--with-gnutls],[enable GnuTLS support]), [want_gnutls=$withval], [want_gnutls=no])
@@ -254,14 +258,6 @@ AC_CONFIG_FILES([Makefile
pan/gui/Makefile])
dnl pan/data/decode-test-cache/Makefile
-dnl Check whether we are building with gnome-doc-utils
-if test "x$want_gnome_doc_help" = "xyes" ; then
- echo "checking whether we are building with gnome-doc-utils... yes"
- AC_CONFIG_FILES([help/Makefile])
-else
- echo "checking whether we are building with gnome-doc-utils... no"
-fi
-
AC_OUTPUT
echo "
diff --git a/pan.cbp b/pan.cbp
index 08b5c4a..581628d 100644
--- a/pan.cbp
+++ b/pan.cbp
@@ -83,9 +83,6 @@
<Unit filename="pan/data-impl/rules-filter.h" />
<Unit filename="pan/data-impl/server.cc" />
<Unit filename="pan/data-impl/speed-test-load-group.cc" />
- <Unit filename="pan/data-impl/sql-db.cc">
- <Option target="all_linux" />
- </Unit>
<Unit filename="pan/data-impl/sql-db.h">
<Option target="all_linux" />
</Unit>
diff --git a/pan/data-impl/data-io.cc b/pan/data-impl/data-io.cc
index 4559979..56127bf 100644
--- a/pan/data-impl/data-io.cc
+++ b/pan/data-impl/data-io.cc
@@ -202,7 +202,7 @@ namespace
const std::string tmpfile (filename + ".tmp");
if (ok) {
- remove (filename.c_str());
+// ::remove (filename.c_str()); not needed
if (rename (tmpfile.c_str(), filename.c_str()))
std::cerr << LINE_ID << " ERROR renaming from [" << tmpfile << "] to [" << filename << "]: " << g_strerror(errno) << '\n';
if (chmod (filename.c_str(), 0600))
diff --git a/pan/gui/actions.cc b/pan/gui/actions.cc
index 126d80b..01b6410 100644
--- a/pan/gui/actions.cc
+++ b/pan/gui/actions.cc
@@ -174,7 +174,6 @@ namespace pan
void do_post (GtkAction*) { pan_ui->do_post(); }
void do_followup_to (GtkAction*) { pan_ui->do_followup_to(); }
void do_reply_to (GtkAction*) { pan_ui->do_reply_to(); }
- void do_pan_manual (GtkAction*) { pan_ui->do_pan_manual(); }
void do_pan_web (GtkAction*) { pan_ui->do_pan_web(); }
void do_bug_report (GtkAction*) { pan_ui->do_bug_report(); }
void do_tip_jar (GtkAction*) { pan_ui->do_tip_jar(); }
@@ -648,11 +647,6 @@ namespace pan
NULL,
G_CALLBACK(do_reply_to) },
- { "pan-manual", NULL,
- N_("_Contents"), "F1",
- NULL,
- G_CALLBACK(do_pan_manual) },
-
{ "pan-web-page", NULL,
N_("_Pan Home Page"), NULL,
NULL,
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 2914919..18a3f87 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -1548,22 +1548,24 @@ void GUI :: do_reply_to ()
g_object_unref (message);
}
}
-void GUI :: do_pan_manual ()
-{
-#ifdef HAVE_HELP
- GError * error (NULL);
- gtk_show_uri (NULL, "ghelp:pan", gtk_get_current_event_time (), &error);
- if (error) {
- GtkWidget * w = gtk_message_dialog_new (get_window(_root),
- GtkDialogFlags(GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT),
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Unable to open help file"));
- g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
- gtk_widget_show_all (w);
- }
-#endif
-}
+
+//void GUI :: do_pan_manual ()
+//{
+//#ifdef HAVE_HELP
+// GError * error (NULL);
+// gtk_show_uri (NULL, "ghelp:pan", gtk_get_current_event_time (), &error);
+// if (error) {
+// GtkWidget * w = gtk_message_dialog_new (get_window(_root),
+// GtkDialogFlags(GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT),
+// GTK_MESSAGE_ERROR,
+// GTK_BUTTONS_CLOSE,
+// _("Unable to open help file"));
+// g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
+// gtk_widget_show_all (w);
+// }
+//#endif
+//}
+
void GUI :: do_pan_web ()
{
URL :: open (_prefs, "http://pan.rebelbase.com/");
diff --git a/pan/gui/gui.h b/pan/gui/gui.h
index 2c977bb..95ca13d 100644
--- a/pan/gui/gui.h
+++ b/pan/gui/gui.h
@@ -155,7 +155,6 @@ namespace pan
virtual void do_post ();
virtual void do_followup_to ();
virtual void do_reply_to ();
- virtual void do_pan_manual ();
virtual void do_pan_web ();
virtual void do_bug_report ();
virtual void do_tip_jar ();
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index 14e4a6e..b09ad05 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -515,7 +515,7 @@ HeaderPane :: build_model (const Quark & group,
namespace
{
- void save_sort_order (Prefs& prefs, PanTreeStore* store)
+ void save_sort_order (const Quark& group, GroupPrefs& prefs, PanTreeStore* store)
{
g_assert (store);
g_assert (GTK_IS_TREE_SORTABLE(store));
@@ -523,8 +523,8 @@ namespace
gint sort_column (0);
GtkSortType sort_type;
gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE(store), &sort_column, &sort_type);
- prefs.set_int ("header-pane-sort-column", sort_column);
- prefs.set_flag ("header-pane-sort-ascending", sort_type==GTK_SORT_ASCENDING);
+ prefs.set_int (group, "header-pane-sort-column", sort_column);
+ prefs.set_flag (group, "header-pane-sort-ascending", sort_type==GTK_SORT_ASCENDING);
}
}
@@ -541,8 +541,8 @@ HeaderPane :: rebuild ()
_mid_to_row.clear ();
_tree_store = build_model (_group, _atree, NULL);
- const bool sort_ascending = _prefs.get_flag ("header-pane-sort-ascending", false);
- int sort_column = _prefs.get_int ("header-pane-sort-column", COL_DATE);
+ const bool sort_ascending = _group_prefs.get_flag (_group, "header-pane-sort-ascending", false);
+ int sort_column = _group_prefs.get_int (_group, "header-pane-sort-column", COL_DATE);
if (sort_column<0 || sort_column>=N_COLUMNS) // safeguard against odd settings
sort_column = COL_DATE;
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(_tree_store),
@@ -577,7 +577,7 @@ HeaderPane :: set_group (const Quark& new_group)
if (_tree_store)
{
- save_sort_order (_prefs, _tree_store);
+ save_sort_order (get_group(), _group_prefs, _tree_store);
_mid_to_row.clear ();
_tree_store = 0;
gtk_tree_view_set_model (GTK_TREE_VIEW(_tree_view), NULL);
@@ -1056,6 +1056,7 @@ namespace
static gboolean return_pressed_download_all (gpointer data)
{
HeaderPane * self (static_cast<HeaderPane*>(data));
+ // TODO move this into headerpane
self->_gui.do_read_or_save_articles();
return false;
diff --git a/pan/gui/pan-ui.h b/pan/gui/pan-ui.h
index 3491bd6..98c4d13 100644
--- a/pan/gui/pan-ui.h
+++ b/pan/gui/pan-ui.h
@@ -83,7 +83,6 @@ namespace pan
virtual void do_post () = 0;
virtual void do_followup_to () = 0;
virtual void do_reply_to () = 0;
- virtual void do_pan_manual () = 0;
virtual void do_pan_web () = 0;
virtual void do_bug_report () = 0;
virtual void do_tip_jar () = 0;
diff --git a/pan/gui/pan.ui.h b/pan/gui/pan.ui.h
index 18a547b..d9904c1 100644
--- a/pan/gui/pan.ui.h
+++ b/pan/gui/pan.ui.h
@@ -149,7 +149,6 @@ const char * fallback_ui_file =
" <menuitem action='cancel-article' />\n"
" </menu>\n"
" <menu action='help-menu'>\n"
-" <menuitem action='pan-manual' />\n"
" <menuitem action='pan-web-page' />\n"
" <menuitem action='tip-jar' />\n"
" <menuitem action='bug-report' />\n"
diff --git a/pan/gui/pan.ui.ssl.h b/pan/gui/pan.ui.ssl.h
index 8b62934..2867de5 100644
--- a/pan/gui/pan.ui.ssl.h
+++ b/pan/gui/pan.ui.ssl.h
@@ -150,7 +150,6 @@ const char * fallback_ui_file =
" <menuitem action='cancel-article' />\n"
" </menu>\n"
" <menu action='help-menu'>\n"
-" <menuitem action='pan-manual' />\n"
" <menuitem action='pan-web-page' />\n"
" <menuitem action='tip-jar' />\n"
" <menuitem action='bug-report' />\n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]