[dasher] Up dependency from glib/gtk 2.4 to 2.6. This is untested on maemo, but



commit 94c2cb636f5698b6f37f832a76489df5b078a408
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Tue May 5 17:17:30 2009 +0100

    Up dependency from glib/gtk 2.4 to 2.6. This is untested on maemo, but
    maemo apparently imported gtk 2.6.4 in July 2005, and e.g. the Nokia 770
    runs OS2006.
---
 ChangeLog                |    5 ++++
 Src/Gtk2/dasher_main.cpp |   53 ----------------------------------------------
 Src/main.cc              |    7 +-----
 configure.ac             |    4 +-
 4 files changed, 8 insertions(+), 61 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b2b20ff..7cbd0f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-02  Patrick Welche  <prlw1 cam ac uk>
+
+	* Require glib and gtk 2.6.0 (in maemo and released December 2004),
+	and garbage collect code.
+		
 2009-05-01  Patrick Welche  <prlw1 cam ac uk>
 
 	* configure.ac,autogen.sh: Rename configure.in to configure.ac,
diff --git a/Src/Gtk2/dasher_main.cpp b/Src/Gtk2/dasher_main.cpp
index b514684..aae88ac 100644
--- a/Src/Gtk2/dasher_main.cpp
+++ b/Src/Gtk2/dasher_main.cpp
@@ -494,9 +494,7 @@ dasher_main_load_interface(DasherMain *pSelf) {
 
   GtkCellRenderer *pRenderer;
   pRenderer = gtk_cell_renderer_text_new();
-#if GTK_CHECK_VERSION(2,6,0)
   g_object_set(G_OBJECT(pRenderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-#endif
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(pPrivate->pAlphabetCombo), pRenderer, true);
   gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(pPrivate->pAlphabetCombo), pRenderer, "text", 0, NULL);
 
@@ -1165,8 +1163,6 @@ static void
 dasher_main_command_about(DasherMain *pSelf) {
   DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(pSelf);
 
-#if (defined GNOME_LIBS) || (GTK_CHECK_VERSION(2,6,0))
-
   // In alphabetical order - please keep this in sync with the AUTHORS
   // file at root of the package tree
   const gchar *authors[] = {
@@ -1202,7 +1198,6 @@ dasher_main_command_about(DasherMain *pSelf) {
     NULL
   };
 
-#if GTK_CHECK_VERSION(2,6,0)
   gtk_show_about_dialog(GTK_WINDOW(pPrivate->pMainWindow),
 			"authors", authors,
 			"comments", _("Dasher is a predictive text entry application"), 
@@ -1215,54 +1210,6 @@ dasher_main_command_about(DasherMain *pSelf) {
 			"website", "http://www.dasher.org.uk/";,
 			"wrap-license", true,
 			NULL);
-#else
-  gchar *translator_credits = _("translator-credits");
-
-  GtkWidget *about = gnome_about_new (_("Dasher"), 
-			   PACKAGE_VERSION, 
-			   "Copyright The Dasher Project\n",
-			   _("Dasher is a predictive text entry application"),
-			   (const char **)authors,
-			   (const char **)documenters,
-			   strcmp (translator_credits, "translator-credits") != 0 ? (const char *)translator_credits : NULL,
-			   NULL);
-  
-  gtk_window_set_transient_for (GTK_WINDOW(about), GTK_WINDOW(pPrivate->pMainWindow));
-  //  g_signal_connect (G_OBJECT (about), "destory", G_CALLBACK (gtk_widget_destroyed), &about);
-  gtk_widget_show(about);
-
-#endif
-  
-#else
-  // EAT UGLY ABOUT BOX, PHILISTINE
-  GtkWidget *label, *button;
-  char *tmp;
-
-  GtkWidget *about = gtk_dialog_new();
-
-  gtk_dialog_set_has_separator(GTK_DIALOG(about), FALSE);
-  gtk_window_set_title(GTK_WINDOW(about), "About Dasher");
-
-  tmp = g_strdup_printf("Dasher Version %s ", VERSION);
-  label = gtk_label_new(tmp);
-  gtk_widget_show(label);
-  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label, FALSE, FALSE, 0);
-
-  label = gtk_label_new("http://www.dasher.org.uk/";);
-  gtk_widget_show(label);
-  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label, FALSE, FALSE, 0);
-
-  label = gtk_label_new("Copyright The Dasher Project");
-  gtk_widget_show(label);
-  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label, TRUE, TRUE, 0);
-
-  button = gtk_button_new_from_stock(GTK_STOCK_OK);
-  gtk_widget_show(button);
-  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), button, FALSE, FALSE, 0);
-  g_signal_connect_swapped(G_OBJECT(button), "clicked", G_CALLBACK(gtk_widget_destroy), G_OBJECT(about));
-
-  gtk_widget_show(about);
-#endif
 }
 
 static gboolean 
diff --git a/Src/main.cc b/Src/main.cc
index 8e94b0e..11b58ce 100644
--- a/Src/main.cc
+++ b/Src/main.cc
@@ -12,9 +12,7 @@
 #include <gdk/gdkx.h>
 #include <glade/glade.h>
 #include <signal.h>
-#if GLIB_CHECK_VERSION(2,6,0)
 #include <Gtk2/DasherAppSettings.h>
-#endif
 
 #ifdef WITH_MAEMO
 #include <libosso.h>
@@ -177,8 +175,6 @@ int main(int argc, char *argv[]) {
   sCommandLine.szAppStyle = NULL;
   sCommandLine.szOptions = NULL;
 
-  // TODO: It would be nice to have command line parsing in version prior to goption (eg in Solaris 10)...
-#if GLIB_CHECK_VERSION(2,6,0)
   gboolean do_option_help = false;
   static const GOptionEntry options[] = {
     //   {"timedata", 'w', 0, G_OPTION_ARG_NONE, &timedata, "Write basic timing information to stdout", NULL},
@@ -212,7 +208,6 @@ int main(int argc, char *argv[]) {
     option_help();
     return 0;
   }
-#endif 
 
 #ifdef WITH_GPE
   gpe_application_init(&argc, &argv);
@@ -250,7 +245,7 @@ int main(int argc, char *argv[]) {
 #endif
 
   g_set_application_name("Dasher");
-#if (!defined WITH_MAEMO) && GTK_CHECK_VERSION(2,6,0)
+#ifndef WITH_MAEMO
   gtk_window_set_default_icon_name("dasher");
 #endif
 
diff --git a/configure.ac b/configure.ac
index 1cc2cd1..9a34b95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_LD_GNU
 
 WITHGTK2=true;
 
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.4)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6)
 
 AC_CHECK_LIB(expat, XML_Parse,, AC_MSG_ERROR([Expat library not found.]))
 AC_LANG_PUSH(C++)
@@ -192,7 +192,7 @@ AC_ARG_WITH([cairo],
 
 if test x"$WITHGTK2" = xtrue
 then 
-	PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.4.0,[GTK2HERE=true],[GTK2HERE=false]) 
+	PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.6.0,[GTK2HERE=true],[GTK2HERE=false]) 
 	PKG_CHECK_MODULES(GCONF, gconf-2.0,[GCONF2HERE=true],[GCONF2HERE=false])
 	if test x$GCONF2HERE = xfalse; then
 	   AC_MSG_WARN("GConf was not detected - user preferences will not be stored.")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]