gnome-utils r8172 - in trunk: . gnome-dictionary gnome-dictionary/src gnome-screenshot logview
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-utils r8172 - in trunk: . gnome-dictionary gnome-dictionary/src gnome-screenshot logview
- Date: Tue, 4 Nov 2008 00:27:16 +0000 (UTC)
Author: cosimoc
Date: Tue Nov 4 00:27:16 2008
New Revision: 8172
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8172&view=rev
Log:
Bug #557562, drop libgnome/libgnomeui dependency.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/gnome-dictionary/ChangeLog
trunk/gnome-dictionary/src/gdict-app.c
trunk/gnome-dictionary/src/gdict-app.h
trunk/gnome-dictionary/src/gdict-pref-dialog.c
trunk/gnome-dictionary/src/gdict-source-dialog.c
trunk/gnome-dictionary/src/gdict-window.c
trunk/gnome-screenshot/ChangeLog
trunk/gnome-screenshot/Makefile.am
trunk/logview/ChangeLog
trunk/logview/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Nov 4 00:27:16 2008
@@ -86,19 +86,27 @@
LIBGTOP_REQUIRED=2.12.0
GNOMECANVAS_REQUIRED=2.10.2
-dnl *****************************************
-dnl libgnome, libgnomeui needed for all utils
-dnl *****************************************
+dnl ********************************************
+dnl glib, gio, gtk, gconf: needed for all utils
+dnl ********************************************
PKG_CHECK_MODULES(GNOME_UTILS, glib-2.0 >= $GLIB_REQUIRED dnl
gio-2.0 >= $GIO_REQUIRED dnl
- gtk+-2.0 >= $GTK_REQUIRED dnl
- libgnome-2.0 >= $LIBGNOME_REQUIRED dnl
- libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
+ gconf-2.0 dnl
+ gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(GNOME_UTILS_CFLAGS)
AC_SUBST(GNOME_UTILS_LIBS)
dnl *****************************************
+dnl separate check for libgnome/libgnomeui
+dnl *****************************************
+
+PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED dnl
+ libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
+AC_SUBST(LIBGNOME_CFLAGS)
+AC_SUBST(LIBGNOME_LIBS)
+
+dnl *****************************************
dnl floppy-buddy needs libglade
dnl *****************************************
PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
@@ -143,12 +151,6 @@
AC_CHECK_HEADERS(X11/extensions/shape.h, XSHAPE_LIBS="-lXext")
AC_SUBST(XSHAPE_LIBS)
-PKG_CHECK_MODULES(SCREENSHOT, gio-2.0 >= $GLIB_REQUIRED dnl
- gconf-2.0 dnl
- gtk+-2.0 >= $GTK_REQUIRED)
-AC_SUBST(SCREENSHOT_CFLAGS)
-AC_SUBST(SCREENSHOT_LIBS)
-
dnl ****************************************
dnl HAL for floppy detection in gfloppy
dnl ****************************************
Modified: trunk/gnome-dictionary/src/gdict-app.c
==============================================================================
--- trunk/gnome-dictionary/src/gdict-app.c (original)
+++ trunk/gnome-dictionary/src/gdict-app.c Tue Nov 4 00:27:16 2008
@@ -33,7 +33,6 @@
#include <gtk/gtk.h>
#include <glib/goption.h>
#include <glib/gi18n.h>
-#include <libgnome/libgnome.h>
#include "gdict-common.h"
#include "gdict-pref-dialog.h"
@@ -76,9 +75,6 @@
g_free (app->database);
g_free (app->source_name);
- if (app->program)
- g_object_unref (G_OBJECT (app->program));
-
G_OBJECT_CLASS (gdict_app_parent_class)->finalize (object);
}
@@ -97,18 +93,6 @@
app->current_window = NULL;
}
-static gboolean
-save_yourself_cb (GnomeClient *client,
- gint phase,
- GnomeSaveStyle save_style,
- gint shutdown,
- GnomeInteractStyle interact_style,
- gint fast,
- gpointer user_data)
-{
- return TRUE;
-}
-
static void
gdict_window_destroy_cb (GtkWidget *widget,
gpointer user_data)
@@ -336,7 +320,7 @@
void
gdict_init (int *argc, char ***argv)
{
- GError *gconf_error;
+ GError *gconf_error, *err = NULL;
GOptionContext *context;
GOptionGroup *group;
gchar *loader_path;
@@ -391,14 +375,19 @@
g_option_group_add_entries (group, gdict_app_goptions);
g_option_context_set_main_group (context, group);
g_option_context_add_group (context, gdict_get_option_group ());
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+
+ g_option_context_parse (context, argc, argv, &err);
+
+ if (err) {
+ g_critical ("Failed to parse argument: %s", err->message);
+ g_error_free (err);
+ g_option_context_free (context);
+ gdict_cleanup ();
+
+ exit (1);
+ }
- singleton->program = gnome_program_init ("gnome-dictionary",
- VERSION,
- LIBGNOMEUI_MODULE,
- *argc, *argv,
- GNOME_PARAM_APP_DATADIR, DATADIR,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- NULL);
g_set_application_name (_("Dictionary"));
gtk_window_set_default_icon_name ("accessories-dictionary");
@@ -409,15 +398,6 @@
exit (1);
}
- /* session management */
- singleton->client = gnome_master_client ();
- if (singleton->client)
- {
- g_signal_connect (singleton->client, "save-yourself",
- G_CALLBACK (save_yourself_cb),
- NULL);
- }
-
gconf_error = NULL;
singleton->gconf_client = gconf_client_get_default ();
gconf_client_add_dir (singleton->gconf_client,
Modified: trunk/gnome-dictionary/src/gdict-app.h
==============================================================================
--- trunk/gnome-dictionary/src/gdict-app.h (original)
+++ trunk/gnome-dictionary/src/gdict-app.h Tue Nov 4 00:27:16 2008
@@ -24,8 +24,6 @@
#define __GDICT_APP_H__
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-client.h>
#include <gconf/gconf-client.h>
#include <libgdict/gdict.h>
@@ -45,9 +43,6 @@
{
GObject parent_instance;
- GnomeProgram *program;
- GnomeClient *client;
-
GConfClient *gconf_client;
GSList *lookup_words;
Modified: trunk/gnome-dictionary/src/gdict-pref-dialog.c
==============================================================================
--- trunk/gnome-dictionary/src/gdict-pref-dialog.c (original)
+++ trunk/gnome-dictionary/src/gdict-pref-dialog.c Tue Nov 4 00:27:16 2008
@@ -36,7 +36,6 @@
#include <glib/gi18n.h>
#include <glade/glade.h>
#include <gconf/gconf-client.h>
-#include <libgnomeui/gnome-help.h>
#include "gdict-source-dialog.h"
#include "gdict-pref-dialog.h"
@@ -495,12 +494,9 @@
switch (response_id)
{
case GTK_RESPONSE_HELP:
- gnome_help_display_desktop_on_screen (NULL,
- "gnome-dictionary",
- "gnome-dictionary",
- "gnome-dictionary-preferences",
- gtk_widget_get_screen (GTK_WIDGET (dialog)),
- &err);
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
+ "ghelp:gnome-dictionary#gnome-dictionary-preferences",
+ gtk_get_current_event_time (), &err);
if (err)
{
GtkWidget *error_dialog;
Modified: trunk/gnome-dictionary/src/gdict-source-dialog.c
==============================================================================
--- trunk/gnome-dictionary/src/gdict-source-dialog.c (original)
+++ trunk/gnome-dictionary/src/gdict-source-dialog.c Tue Nov 4 00:27:16 2008
@@ -36,7 +36,6 @@
#include <glib/gi18n.h>
#include <glade/glade.h>
#include <gconf/gconf-client.h>
-#include <libgnomeui/gnome-help.h>
#include "gdict-source-dialog.h"
@@ -487,17 +486,17 @@
build_new_source (GDICT_SOURCE_DIALOG (dialog));
break;
case GTK_RESPONSE_HELP:
- gnome_help_display_desktop_on_screen (NULL,
- "gnome-dictionary",
- "gnome-dictionary",
- "gnome-dictionary-add-source",
- gtk_widget_get_screen (GTK_WIDGET (dialog)),
- &err);
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
+ "ghelp:gnome-dictionary#gnome-dictionary-add-source",
+ gtk_get_current_event_time (), &err);
if (err)
- gdict_show_gerror_dialog (GTK_WINDOW (dialog),
- _("There was an error while displaying help"),
- err);
-
+ {
+ gdict_show_gerror_dialog (GTK_WINDOW (dialog),
+ _("There was an error while displaying help"),
+ err);
+ g_error_free (err);
+ }
+
/* we don't want the dialog to close itself */
g_signal_stop_emission_by_name (dialog, "response");
break;
Modified: trunk/gnome-dictionary/src/gdict-window.c
==============================================================================
--- trunk/gnome-dictionary/src/gdict-window.c (original)
+++ trunk/gnome-dictionary/src/gdict-window.c Tue Nov 4 00:27:16 2008
@@ -32,8 +32,6 @@
#include <gtk/gtk.h>
#include <glib/goption.h>
#include <glib/gi18n.h>
-#include <libgnome/libgnome.h>
-#include <libgnomeui/gnome-help.h>
#include <libgdict/gdict.h>
@@ -1137,18 +1135,16 @@
GError *err = NULL;
g_return_if_fail (GDICT_IS_WINDOW (window));
-
- gnome_help_display_desktop_on_screen (NULL,
- "gnome-dictionary",
- "gnome-dictionary",
- NULL,
- gtk_widget_get_screen (GTK_WIDGET (window)),
- &err);
+
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
+ "ghelp:gnome-dictionary",
+ gtk_get_current_event_time (), &err);
if (err)
{
gdict_show_gerror_dialog (GTK_WINDOW (window),
_("There was an error while displaying help"),
err);
+ g_error_free (err);
}
}
Modified: trunk/gnome-screenshot/Makefile.am
==============================================================================
--- trunk/gnome-screenshot/Makefile.am (original)
+++ trunk/gnome-screenshot/Makefile.am Tue Nov 4 00:27:16 2008
@@ -5,7 +5,7 @@
-I$(srcdir) \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DUIDIR=\""$(uidir)"\" \
- $(SCREENSHOT_CFLAGS) \
+ $(GNOME_UTILS_CFLAGS) \
$(NULL)
bin_PROGRAMS = \
@@ -30,7 +30,7 @@
gnome_screenshot_LDADD = \
$(XSHAPE_LIBS) \
- $(SCREENSHOT_LIBS) \
+ $(GNOME_UTILS_LIBS) \
$(NULL)
gnome_screenshotdir = $(datadir)/applications
Modified: trunk/logview/Makefile.am
==============================================================================
--- trunk/logview/Makefile.am (original)
+++ trunk/logview/Makefile.am Tue Nov 4 00:27:16 2008
@@ -7,6 +7,7 @@
INCLUDES = \
$(GNOME_UTILS_CFLAGS) \
+ $(LIBGNOME_CFLAGS) \
-DG_LOG_DOMAIN=\"gnome-system-log\" \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DDATADIR=\""$(datadir)"\" \
@@ -40,7 +41,8 @@
loglist.h
gnome_system_log_LDADD = \
- $(GNOME_UTILS_LIBS)
+ $(GNOME_UTILS_LIBS) \
+ $(LIBGNOME_LIBS)
man_MANS = gnome-system-log.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]