gnome-utils r8154 - in trunk: . gnome-screenshot
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-utils r8154 - in trunk: . gnome-screenshot
- Date: Tue, 21 Oct 2008 08:33:38 +0000 (UTC)
Author: cosimoc
Date: Tue Oct 21 08:33:38 2008
New Revision: 8154
URL: http://svn.gnome.org/viewvc/gnome-utils?rev=8154&view=rev
Log:
2008-10-21 Cosimo Cecchi <cosimoc gnome org>
* configure.ac: Bump GTK+ requirement to 2.14.0.
Drop libgnomeui dependency from gnome-screenshot (#557169).
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/gnome-screenshot/ChangeLog
trunk/gnome-screenshot/Makefile.am
trunk/gnome-screenshot/gnome-screenshot.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Oct 21 08:33:38 2008
@@ -75,7 +75,7 @@
GLIB_REQUIRED=2.16.0
GIO_REQUIRED=2.16.0
-GTK_REQUIRED=2.11.6
+GTK_REQUIRED=2.14.0
LIBGNOME_DESKTOP_REQUIRED=2.9.91
LIBGNOME_REQUIRED=2.13.2
LIBGNOMEUI_REQUIRED=2.13.7
@@ -144,8 +144,8 @@
AC_SUBST(XSHAPE_LIBS)
PKG_CHECK_MODULES(SCREENSHOT, gio-2.0 >= $GLIB_REQUIRED dnl
- gtk+-2.0 >= $GTK_REQUIRED dnl
- libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
+ gconf-2.0 dnl
+ gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(SCREENSHOT_CFLAGS)
AC_SUBST(SCREENSHOT_LIBS)
Modified: trunk/gnome-screenshot/Makefile.am
==============================================================================
--- trunk/gnome-screenshot/Makefile.am (original)
+++ trunk/gnome-screenshot/Makefile.am Tue Oct 21 08:33:38 2008
@@ -1,17 +1,8 @@
NULL =
-# Used by the GNOME_PROGRAM_STANDARD_PROPERTIES macros
-STANDARD_PROPERTIES_CFLAGS = \
- -DPREFIX=\""$(prefix)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- $(NULL)
-
INCLUDES = \
-I. \
-I$(srcdir) \
- $(STANDARD_PROPERTIES_CFLAGS) \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DUIDIR=\""$(uidir)"\" \
$(SCREENSHOT_CFLAGS) \
Modified: trunk/gnome-screenshot/gnome-screenshot.c
==============================================================================
--- trunk/gnome-screenshot/gnome-screenshot.c (original)
+++ trunk/gnome-screenshot/gnome-screenshot.c Tue Oct 21 08:33:38 2008
@@ -25,9 +25,9 @@
/* MAYBE I LIED... -jrb */
#include <config.h>
-#include <gnome.h>
#include <gconf/gconf-client.h>
#include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -118,17 +118,16 @@
{
GError *error = NULL;
- gnome_help_display_desktop (NULL,
- "user-guide",
- "user-guide.xml",
- "goseditmainmenu-53",
- &error);
+ gtk_show_uri (gtk_window_get_screen (parent),
+ "ghelp:user-guide#goseditmainmenu-53",
+ gtk_get_current_event_time (), &error);
if (error)
{
screenshot_show_gerror_dialog (parent,
_("Error loading the help page"),
error);
+ g_error_free (error);
}
}
@@ -458,7 +457,7 @@
adjust = GTK_ADJUSTMENT (gtk_adjustment_new ((gdouble) delay,
0.0, 99.0,
1.0, 1.0,
- 1.0));
+ 0.0));
spin = gtk_spin_button_new (adjust, 1.0, 0);
g_signal_connect (spin, "value-changed",
G_CALLBACK (delay_spin_value_changed_cb),
@@ -1004,12 +1003,8 @@
static void
load_options (void)
{
- GnomeClient *client;
GConfClient *gconf_client;
- client = gnome_master_client ();
- gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
-
gconf_client = gconf_client_get_default ();
/* Find various dirs */
@@ -1100,7 +1095,6 @@
int
main (int argc, char *argv[])
{
- GnomeProgram *program;
GOptionContext *context;
GOptionGroup *group;
gboolean window_arg = FALSE;
@@ -1109,6 +1103,7 @@
gboolean interactive_arg = FALSE;
gchar *border_effect_arg = NULL;
guint delay_arg = 0;
+ GError *error = NULL;
const GOptionEntry entries[] = {
{ "window", 'w', 0, G_OPTION_ARG_NONE, &window_arg, N_("Grab a window instead of the entire screen"), NULL },
@@ -1129,13 +1124,19 @@
g_option_context_set_ignore_unknown_options (context, FALSE);
g_option_context_set_help_enabled (context, TRUE);
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+
+ g_option_context_parse (context, &argc, &argv, &error);
+
+ if (error) {
+ g_critical ("Unable to parse arguments: %s", error->message);
+ g_error_free (error);
+ g_option_context_free (context);
+ exit (1);
+ }
+
+ g_option_context_free (context);
- program = gnome_program_init ("gnome-screenshot", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- NULL);
gtk_window_set_default_icon_name (SCREENSHOOTER_ICON);
screenshooter_init_stock_icons ();
@@ -1173,7 +1174,6 @@
{
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CANCEL:
- g_object_unref (program);
return EXIT_SUCCESS;
case GTK_RESPONSE_OK:
break;
@@ -1197,7 +1197,5 @@
gtk_main ();
- g_object_unref (program);
-
return EXIT_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]