[maemo-commits] [maemo-commits] r12458 - in projects/haf/branches/hildon-control-panel/refactoring: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 26 11:21:41 EEST 2007
Author: lucasr
Date: 2007-06-26 11:21:25 +0300 (Tue, 26 Jun 2007)
New Revision: 12458

Modified:
   projects/haf/branches/hildon-control-panel/refactoring/ChangeLog
   projects/haf/branches/hildon-control-panel/refactoring/configure.ac
   projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-view.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-grid.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-program.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-rfs.c
   projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c
Log:
2007-06-26  Lucas Rocha  <lucas.rocha at nokia.com>

	* configure.ac: added --enable-maemo-tools option to enable/disable
	the "Mobile operator setup wizard", "Restore original settings" and
	"Clear user data" menu items. It's enabled by default.
	* src/hcp-window.c: made the "Tools" menu optional.
	* src/*.c: include config.h on all source files.


Modified: projects/haf/branches/hildon-control-panel/refactoring/ChangeLog
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/ChangeLog	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/ChangeLog	2007-06-26 08:21:25 UTC (rev 12458)
@@ -1,3 +1,11 @@
+2007-06-26  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* configure.ac: added --enable-maemo-tools option to enable/disable
+	the "Mobile operator setup wizard", "Restore original settings" and
+	"Clear user data" menu items. It's enabled by default.
+	* src/hcp-window.c: made the "Tools" menu optional.
+	* src/*.c: include config.h on all source files.
+
 2007-06-21  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hcp-window.c: added Ctrl-Q accelerator to Close menu item. Fixes

Modified: projects/haf/branches/hildon-control-panel/refactoring/configure.ac
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/configure.ac	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/configure.ac	2007-06-26 08:21:25 UTC (rev 12458)
@@ -35,8 +35,28 @@
 AC_SUBST(ALL_LINGUAS)
 AM_GLIB_GNU_GETTEXT
 
-PKG_CHECK_MODULES(OSSOSETTINGS, osso-af-settings >= 0.8.1)
-localedir=`pkg-config osso-af-settings --variable=localedir`
+AC_ARG_ENABLE(maemo-tools,
+	      AS_HELP_STRING([--enable-maemo-tools],[Enable mobile operator, clear and restore user data tools (default=yes)]),
+	      [enable_maemo_tools=$enableval], 
+              [enable_maemo_tools=yes])
+
+AM_CONDITIONAL(USE_MAEMO_TOOLS, test "x$enable_maemo_tools" = "xyes")
+
+if test "x$enable_maemo_tools" = "xyes"; then
+    AC_DEFINE([MAEMO_TOOLS],[1],[Define to enable mobile operator, clear and restore user data tools])
+fi
+
+PKG_CHECK_MODULES(OSSOSETTINGS, 
+		  [osso-af-settings >= 0.9.0],
+		  [
+		  localedir=`pkg-config osso-af-settings --variable=localedir`
+                  hildondesktopentrydir=`pkg-config osso-af-settings --variable=desktopentrydir`
+		  ],[
+		  localedir="${datadir}/locale"
+                  hildondesktopentrydir="${datadir}/applications"
+		  ])
+
+AC_SUBST(hildondesktopentrydir)
 AC_SUBST(localedir)
 
 PKG_CHECK_MODULES(OSSO,libosso >= 0.10.0)
@@ -59,11 +79,7 @@
 AC_SUBST(GCONF_LIBS)
 AC_SUBST(GCONF_CFLAGS)
 
-hildondesktopentrydir=`pkg-config osso-af-settings --variable=desktopentrydir`
-AC_SUBST(hildondesktopentrydir)
-
-desktopentrydir=${datadir}/applications
-hildoncpdesktopentrydir=${desktopentrydir}/hildon-control-panel
+hildoncpdesktopentrydir=${datadir}/applications/hildon-control-panel
 hildoncplibdir=${libdir}/hildon-control-panel
 
 AC_SUBST(hildondesktopentrydir)

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/Makefile.am	2007-06-26 08:21:25 UTC (rev 12458)
@@ -40,8 +40,7 @@
 bin_PROGRAMS = controlpanel
 
 controlpanel_SOURCES = \
-	hcp-marshalers.h \
-	hcp-marshalers.c \
+	$(BUILT_SOURCES) \
 	hcp-main.c \
 	hcp-main.h \
 	hcp-program.c \
@@ -56,10 +55,14 @@
 	hcp-app-view.h \
 	hcp-grid.h \
 	hcp-grid.c \
-	hcp-rfs.c \
-	hcp-rfs.h \
 	hildon-cp-plugin-interface.h
 
+if USE_MAEMO_TOOLS
+controlpanel_SOURCES += \
+	hcp-rfs.c \
+	hcp-rfs.h
+endif
+
 BUILT_SOURCES = hcp-marshalers.c \
                 hcp-marshalers.h
 

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-list.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -22,6 +22,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <string.h>
 
 #include <libosso.h>

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-view.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-view.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app-view.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -22,6 +22,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <glib/gi18n.h>
 
 #include "hcp-app-view.h"

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-app.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -22,6 +22,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <dlfcn.h>
 #include <string.h>
 

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-grid.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-grid.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-grid.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -21,6 +21,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <math.h>
 
 #include <hildon/hildon-defines.h>

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-program.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-program.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-program.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -21,6 +21,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-rfs.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-rfs.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-rfs.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -21,6 +21,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <crypt.h>
 #include <strings.h>
 

Modified: projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c
===================================================================
--- projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c	2007-06-26 08:20:26 UTC (rev 12457)
+++ projects/haf/branches/hildon-control-panel/refactoring/src/hcp-window.c	2007-06-26 08:21:25 UTC (rev 12458)
@@ -22,6 +22,10 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <libosso.h>
 #include <hildon/hildon-help.h>
 #include <hildon/hildon-window.h>
@@ -37,9 +41,12 @@
 #include "hcp-app-view.h"
 #include "hcp-app.h"
 #include "hcp-grid.h"
-#include "hcp-rfs.h"
 #include "hcp-config-keys.h"
 
+#ifdef MAEMO_TOOLS
+#include "hcp-rfs.h"
+#endif
+
 #define HCP_WINDOW_GET_PRIVATE(object) \
         (G_TYPE_INSTANCE_GET_PRIVATE ((object), HCP_TYPE_WINDOW, HCPWindowPrivate))
 
@@ -492,6 +499,7 @@
   }
 }
 
+#ifdef MAEMO_TOOLS
 static gboolean 
 hcp_window_clear_user_data (GtkWidget *widget, HCPWindow *window)
 {
@@ -559,6 +567,7 @@
   
   osso_rpc_free_val (&returnvalues);
 }
+#endif
 
 static void 
 hcp_window_iconsize (GtkWidget *widget, HCPWindow *window)
@@ -711,7 +720,9 @@
   GtkMenu *menu = NULL;
   GtkAccelGroup *accel_group;
   GtkWidget *sub_view = NULL;
+#ifdef MAEMO_TOOLS
   GtkWidget *sub_tools = NULL;
+#endif
   GtkWidget *mi = NULL;
   GtkWidget *scrolled_window = NULL;
   GSList *menugroup = NULL;
@@ -800,6 +811,7 @@
   g_signal_connect (G_OBJECT (mi), "activate", 
                     G_CALLBACK (hcp_window_iconsize), window);
 
+#ifdef MAEMO_TOOLS
   /* Tools submenu */
   sub_tools = gtk_menu_new ();
 
@@ -833,11 +845,16 @@
 
   g_signal_connect (G_OBJECT (mi), "activate",
                     G_CALLBACK (hcp_window_clear_user_data), window);
-
+#endif
+  
   /* Help! */
   mi = gtk_menu_item_new_with_label (HCP_MENU_HELP);
 
+#ifdef MAEMO_TOOLS
   gtk_menu_shell_append (GTK_MENU_SHELL (sub_tools), mi);
+#else
+  gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+#endif
 
   g_signal_connect(G_OBJECT (mi), "activate",
                    G_CALLBACK (hcp_window_launch_help), window);


More information about the maemo-commits mailing list