]> git.sur5r.net Git - glabels/commitdiff
2005-03-22 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Wed, 23 Mar 2005 02:52:04 +0000 (02:52 +0000)
committerJim Evins <evins@snaught.com>
Wed, 23 Mar 2005 02:52:04 +0000 (02:52 +0000)
Since the development version now requires gtk-2.6/gnome-2.10, I
have made a first pass at removing deprecations.

* configure.in:
* libglabels/Makefile.am:
* src/Makefile.am:
Added configure option to turn on X_DISABLE_DEPRECATED flags.
Also removed all remnants of HAVE_FILECHOOSER.
* src/file.c: (gl_file_open_real):
Removed code for old GtkFileSelection.
* libglabels/libglabels-private.h:
* libglabels/paper.c:
* libglabels/template.c:
* libglabels/xml-paper.c:
* libglabels/xml-template.c:
* libglabels/xml.c:
* src/bc.c:
* src/file.c:
* src/glabels-batch.c:
* src/glabels.c:
* src/label.c:
* src/merge-init.c:
* src/merge-properties-dialog.c:
* src/merge.c:
* src/object-editor.c:
* src/prefs-dialog.c:
* src/prefs.c:
* src/print-dialog.c:
* src/print.c:
* src/stock.c:
* src/template-designer.c:
* src/ui-property-bar.c:
* src/ui-sidebar.c:
* src/view-barcode.c:
* src/view-box.c:
* src/view-ellipse.c:
* src/view-image.c:
* src/view-line.c:
* src/view-text.c:
* src/view.c:
* src/wdgt-image-select.c:
* src/wdgt-media-select.c:
* src/wdgt-print-copies.c:
* src/wdgt-print-merge.c:
* src/wdgt-rotate-label.c:
* src/window.c:
* src/xml-label-04.c:
* src/xml-label-191.c:
* src/xml-label.c:
Added '#include <glib/gi18n.h>" where needed.
Removed any unused '#include <gnome.h>"s.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@509 f5e0f49d-192f-0410-a22d-a8d8700d0965

43 files changed:
glabels2/ChangeLog
glabels2/configure.in
glabels2/libglabels/Makefile.am
glabels2/libglabels/libglabels-private.h
glabels2/libglabels/paper.c
glabels2/libglabels/template.c
glabels2/libglabels/xml-paper.c
glabels2/libglabels/xml-template.c
glabels2/libglabels/xml.c
glabels2/src/Makefile.am
glabels2/src/bc.c
glabels2/src/file.c
glabels2/src/glabels-batch.c
glabels2/src/glabels.c
glabels2/src/label.c
glabels2/src/merge-init.c
glabels2/src/merge-properties-dialog.c
glabels2/src/merge.c
glabels2/src/object-editor.c
glabels2/src/prefs-dialog.c
glabels2/src/prefs.c
glabels2/src/print-dialog.c
glabels2/src/print.c
glabels2/src/stock.c
glabels2/src/template-designer.c
glabels2/src/ui-property-bar.c
glabels2/src/ui-sidebar.c
glabels2/src/view-barcode.c
glabels2/src/view-box.c
glabels2/src/view-ellipse.c
glabels2/src/view-image.c
glabels2/src/view-line.c
glabels2/src/view-text.c
glabels2/src/view.c
glabels2/src/wdgt-image-select.c
glabels2/src/wdgt-media-select.c
glabels2/src/wdgt-print-copies.c
glabels2/src/wdgt-print-merge.c
glabels2/src/wdgt-rotate-label.c
glabels2/src/window.c
glabels2/src/xml-label-04.c
glabels2/src/xml-label-191.c
glabels2/src/xml-label.c

index f1903fe1c7486ab9350956040758ec4d0e36a903..a60aa76b8bb3ed432fbb8d167d7377d7bfefc79d 100644 (file)
@@ -1,3 +1,57 @@
+2005-03-22  Jim Evins  <evins@snaught.com>
+
+       Since the development version now requires gtk-2.6/gnome-2.10, I
+       have made a first pass at removing deprecations.
+
+       * configure.in:
+       * libglabels/Makefile.am:
+       * src/Makefile.am:
+               Added configure option to turn on X_DISABLE_DEPRECATED flags.
+               Also removed all remnants of HAVE_FILECHOOSER.
+       * src/file.c: (gl_file_open_real):
+               Removed code for old GtkFileSelection.
+       * libglabels/libglabels-private.h:
+       * libglabels/paper.c:
+       * libglabels/template.c:
+       * libglabels/xml-paper.c:
+       * libglabels/xml-template.c:
+       * libglabels/xml.c:
+       * src/bc.c:
+       * src/file.c:
+       * src/glabels-batch.c:
+       * src/glabels.c:
+       * src/label.c:
+       * src/merge-init.c:
+       * src/merge-properties-dialog.c:
+       * src/merge.c:
+       * src/object-editor.c:
+       * src/prefs-dialog.c:
+       * src/prefs.c:
+       * src/print-dialog.c:
+       * src/print.c:
+       * src/stock.c:
+       * src/template-designer.c:
+       * src/ui-property-bar.c:
+       * src/ui-sidebar.c:
+       * src/view-barcode.c:
+       * src/view-box.c:
+       * src/view-ellipse.c:
+       * src/view-image.c:
+       * src/view-line.c:
+       * src/view-text.c:
+       * src/view.c:
+       * src/wdgt-image-select.c:
+       * src/wdgt-media-select.c:
+       * src/wdgt-print-copies.c:
+       * src/wdgt-print-merge.c:
+       * src/wdgt-rotate-label.c:
+       * src/window.c:
+       * src/xml-label-04.c:
+       * src/xml-label-191.c:
+       * src/xml-label.c:
+               Added '#include <glib/gi18n.h>" where needed.
+               Removed any unused '#include <gnome.h>"s.
+
 2005-03-22  Jim Evins  <evins@snaught.com>
 
        * src/commands.c: (activate_url), (gl_cmd_help_about):
index ff53de3536e057483091ae0b3e8ce8467d73029e..ff6d2d2f02839e6c7de728343ed42bab3c3493b0 100644 (file)
@@ -109,12 +109,22 @@ AC_SUBST(LIBGLABELS_LIBS)
 
 
 dnl ---------------------------------------------------------------------------
-dnl - Is the new file chooser available?
-dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.3.2,
-                  HAVE_FILE_CHOOSER="-DHAVE_FILE_CHOOSER",
-                  HAVE_FILE_CHOOSER="-UHAVE_FILE_CHOOSER")
-AC_SUBST(HAVE_FILE_CHOOSER)
+dnl - Enable deprecation testing
+dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(deprecations,
+              [AC_HELP_STRING([--enable-deprecations],
+                              [warn about deprecated usages [default=no]])],,
+              [enable_deprecations=no])
+
+if test "x$enable_deprecations" = "xyes"; then
+   DISABLE_DEPRECATED_CFLAGS="\
+-DG_DISABLE_DEPRECATED \
+-DGDK_DISABLE_DEPRECATED \
+-DGTK_DISABLE_DEPRECATED \
+-DGDK_PIXBUF_DISABLE_DEPRECATED \
+-DGNOME_DISABLE_DEPRECATED"
+   AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
+fi
 
 
 dnl ---------------------------------------------------------------------------
index 4fa2909bedcd26081ca5581de3b0cdd89e10d1a6..36e6c3016ab0990ae59309f30334bbb849d69f1c 100644 (file)
@@ -3,7 +3,8 @@ templatesdir = $(datadir)/glabels/templates
 INCLUDES = \
        $(LIBGLABELS_CFLAGS)                            \
        -DDATADIR=\""$(datadir)"\"                      \
-       -DLIBGLABELS_TEMPLATE_DIR=\""$(templatesdir)"\"
+       -DLIBGLABELS_TEMPLATE_DIR=\""$(templatesdir)"\" \
+       $(DISABLE_DEPRECATED_CFLAGS)
 
 libglabels_la_LDFLAGS=\
         -version-info $(LIBGLABELS_VERSION_INFO) \
index 5fed93e31f456a366fa5058a01e0df7c83ae8f3d..7dcc79a466ec956781f3b4010dea3cde495b1e3f 100644 (file)
 #ifndef __LIBGLABELS_PRIVATE_H__
 #define __LIBGLABELS_PRIVATE_H__
 
-#include <config.h>
-
-#if ENABLE_NLS
-
-#       include <libintl.h>
-#       define _(x) dgettext (GETTEXT_PACKAGE, x)
-#       define N_(x) x
-
-#else
-
-#       define _(x) x
-#       define N_(x) x
-
-#endif
-
 /* Data system and user data directories.  (must free w/ g_free()) */
 #define GL_SYSTEM_DATA_DIR g_build_filename (LIBGLABELS_TEMPLATE_DIR, NULL)
 #define GL_USER_DATA_DIR   g_build_filename (g_get_home_dir (), ".glabels", NULL)
index 0e3ed41e83ae39bba4c58634f2cb924920099b44..31cc10817a4cf930b709bf091cb9dada2954c191 100644 (file)
  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  *  MA 02111-1307, USA
  */
+#include <config.h>
 
-#include "libglabels-private.h"
-
+#include <glib/gi18n.h>
 #include <string.h>
 
+#include "libglabels-private.h"
+
 #include "paper.h"
 #include "xml-paper.h"
 
index a01bb8c483dc41381eff11cce9b26ec8c4ac124b..9fbf729ee155870748c776b7fdedcd9dbc971f08 100644 (file)
  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  *  MA 02111-1307, USA
  */
+#include <config.h>
 
-#include "libglabels-private.h"
-
+#include <glib/gi18n.h>
 #include <string.h>
 
+#include "libglabels-private.h"
+
 #include "xml.h"
 #include "template.h"
 #include "xml-template.h"
index e9425319cf3433b7d75726bb2ea5ff92bbc23ef2..7afd051260f6923ec127f35dcb1bfaf1e429fd47 100644 (file)
  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  *  MA 02111-1307, USA
  */
+#include <config.h>
 
-#include "libglabels-private.h"
-
+#include <glib/gi18n.h>
 #include <string.h>
 #include <libintl.h>
 
+#include "libglabels-private.h"
+
 #include "xml.h"
 #include "xml-paper.h"
 
index 4d93409c51693557882e0f07476ae1044bd1fb6d..fb4365eb267c57cfe977058dfedaa770ce7a573d 100644 (file)
  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  *  MA 02111-1307, USA
  */
+#include <config.h>
 
-#include "libglabels-private.h"
-
+#include <glib/gi18n.h>
 #include <string.h>
 #include <libintl.h>
 
+#include "libglabels-private.h"
+
 #include "paper.h"
 #include "xml.h"
 #include "xml-template.h"
index cf36f056b3eba92dbd7e0f3b8ce34c350e060ecd..3f331deb77c0b4fab161e6f96035f4f8c9b1dc97 100644 (file)
@@ -22,6 +22,9 @@
  *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  *  MA 02111-1307, USA
  */
+#include <config.h>
+
+#include <glib/gi18n.h>
 
 #include "libglabels-private.h"
 
index 63c12e781e961094b6adf707b140f65dbb536cff..d23bc4e862767cf55d4431dd4c0940400a6bb3cf 100644 (file)
@@ -20,7 +20,7 @@ INCLUDES = \
        -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\"             \
        -DGLABELS_UI_DIR=\""$(datadir)/glabels/ui/"\"           \
        -DGLABELS_GLADE_DIR=\""$(datadir)/glabels/glade/"\"     \
-       $(HAVE_FILE_CHOOSER)
+       $(DISABLE_DEPRECATED_CFLAGS)
 
 glabels_LDFLAGS = -export-dynamic
 
index df561c82ee99381b5756174f6a3ba619c234208a..ab1c201d22c1c8acf123bf0f834a2eee6c7634c1 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <config.h>
 
-#include <libgnome/libgnome.h>
+#include <glib/gi18n.h>
 
 #include "bc.h"
 #include "bc-postnet.h"
index 685087275c924b68e2ec9e9b9124ed5878839fd7..267830c82daeab64c0ee1625ba129e6713852973 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 #include <string.h>
 
 #include "xml-label.h"
@@ -65,24 +65,12 @@ static void properties_response              (GtkDialog         *dlg,
                                              gint               response,
                                              gpointer           user_data);
 
-#ifdef HAVE_FILE_CHOOSER
 static void open_response                    (GtkDialog         *chooser,
                                              gint               response,
                                              GtkWindow         *window);
 static void save_as_response                 (GtkDialog         *chooser,
                                              gint               response,
                                              glLabel           *label);
-#else
-static void open_ok                          (GtkWidget         *widget,
-                                             GtkFileSelection  *fsel);
-static void save_as_ok_cb                    (GtkWidget         *widget,
-                                             GtkFileSelection  *fsel);
-static void save_as_cancel_cb                (GtkWidget         *widget,
-                                             GtkFileSelection  *fsel);
-static void save_as_destroy_cb               (GtkWidget         *widget,
-                                             gboolean          *destroy_flag);
-#endif
-
 
 \f
 /*****************************************************************************/
@@ -419,8 +407,6 @@ properties_response (GtkDialog *dlg,
        gl_debug (DEBUG_FILE, "END");
 }
 
-#ifdef HAVE_FILE_CHOOSER
-
 /*****************************************************************************/
 /* "Open" menu callback.                                                     */
 /*****************************************************************************/
@@ -546,114 +532,6 @@ open_response (GtkDialog     *chooser,
        gl_debug (DEBUG_FILE, "END");
 }
 
-#else
-
-/*****************************************************************************/
-/* "Open" menu callback.                                                     */
-/*****************************************************************************/
-void
-gl_file_open (GtkWindow *window)
-{
-       GtkFileSelection *fsel;
-
-       gl_debug (DEBUG_FILE, "START");
-
-       g_return_if_fail (window != NULL);
-
-       fsel = GTK_FILE_SELECTION (gtk_file_selection_new (_("Open")));
-       gtk_window_set_transient_for (GTK_WINDOW (fsel), window);
-       gtk_window_set_title (GTK_WINDOW (fsel), _("Open label"));
-
-       g_object_set_data (G_OBJECT (fsel), "parent_window", window);
-
-       g_signal_connect (G_OBJECT (fsel->ok_button), "clicked",
-                         G_CALLBACK (open_ok), fsel);
-
-       g_signal_connect_swapped (G_OBJECT (fsel->cancel_button), "clicked",
-                                 G_CALLBACK (gtk_widget_destroy),
-                                 G_OBJECT (fsel));
-
-       /* Recover state of open dialog */
-       if (open_path != NULL) {
-               gtk_file_selection_set_filename (fsel, open_path);
-       }
-
-       /* show the dialog */
-       gtk_widget_show (GTK_WIDGET (fsel));
-
-       gl_debug (DEBUG_FILE, "END");
-}
-
-/*---------------------------------------------------------------------------*/
-/* PRIVATE.  Open "O.K." button callback.                                    */
-/*---------------------------------------------------------------------------*/
-static void
-open_ok (GtkWidget        *widget,
-        GtkFileSelection *fsel)
-{
-       gchar            *raw_filename;
-       gchar            *filename;
-       GtkWidget        *dlg;
-       gint              ret;
-       EggRecentModel   *recent;
-       GtkWindow        *window;
-
-       gl_debug (DEBUG_FILE, "START");
-
-       g_return_if_fail (GTK_IS_FILE_SELECTION (fsel));
-
-       /* get the filename */
-       raw_filename = g_strdup (gtk_file_selection_get_filename (fsel));
-       filename = g_filename_to_utf8 (raw_filename, -1, NULL, NULL, NULL);
-
-       if (!raw_filename || 
-           !filename || 
-           g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) {
-
-               dlg = gl_hig_alert_new (GTK_WINDOW(fsel),
-                                       GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                       GTK_MESSAGE_WARNING,
-                                       GTK_BUTTONS_CLOSE,
-                                       _("Empty file name selection"),
-                                       _("Please select a file or supply a valid file name"));
-
-               gtk_dialog_run (GTK_DIALOG (dlg));
-               gtk_widget_destroy (dlg);
-
-       } else {
-
-               if (!g_file_test (raw_filename, G_FILE_TEST_IS_REGULAR)) {
-
-                       dlg = gl_hig_alert_new (GTK_WINDOW(fsel),
-                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                               GTK_MESSAGE_WARNING,
-                                               GTK_BUTTONS_CLOSE,
-                                               _("File does not exist"),
-                                               _("Please select a file or supply a valid file name"));
-
-                       gtk_dialog_run (GTK_DIALOG (dlg));
-                       gtk_widget_destroy (dlg);
-
-
-               } else {
-               
-                       window = g_object_get_data (G_OBJECT(fsel),
-                                                   "parent_window");
-
-                       if ( gl_file_open_real (filename, window) ) {
-                               gtk_widget_destroy (GTK_WIDGET (fsel));
-                       }
-
-               }
-
-       }
-
-       g_free (filename);
-       g_free (raw_filename);
-
-       gl_debug (DEBUG_FILE, "END");
-}
-#endif
 
 /*****************************************************************************/
 /* "Open recent" menu callback.                                              */
@@ -739,10 +617,6 @@ gl_file_open_real (const gchar     *filename,
                if (open_path != NULL)
                        g_free (open_path);
                open_path = g_path_get_dirname (abs_filename);
-#ifndef HAVE_FILE_CHOOSER
-               if (open_path != NULL)
-                       open_path = g_strconcat (open_path, "/", NULL);
-#endif
                g_free (abs_filename);
 
                gl_debug (DEBUG_FILE, "END true");
@@ -825,8 +699,6 @@ gl_file_save (glLabel   *label,
        }
 }
 
-#ifdef HAVE_FILE_CHOOSER
-
 /*****************************************************************************/
 /* "Save As" menu callback.                                                  */
 /*****************************************************************************/
@@ -1025,221 +897,6 @@ save_as_response (GtkDialog     *chooser,
        gl_debug (DEBUG_FILE, "END");
 }
 
-#else
-
-/*****************************************************************************/
-/* "Save As" menu callback.                                                  */
-/*****************************************************************************/
-gboolean
-gl_file_save_as (glLabel   *label,
-                GtkWindow *window)
-{
-       GtkFileSelection *fsel;
-       gboolean          saved_flag = FALSE;
-       gboolean          destroy_flag = FALSE;
-       gchar            *name, *title;
-
-       gl_debug (DEBUG_FILE, "START");
-
-       g_return_val_if_fail (label && GL_IS_LABEL(label), FALSE);
-       g_return_val_if_fail (window && GTK_IS_WINDOW(window), FALSE);
-
-       name = gl_label_get_short_name (label);
-       title = g_strdup_printf (_("Save \"%s\" as"), name);
-       g_free (name);
-
-       fsel = GTK_FILE_SELECTION (gtk_file_selection_new (title));
-       gtk_window_set_modal (GTK_WINDOW (fsel), TRUE);
-       gtk_window_set_transient_for (GTK_WINDOW (fsel), window);
-
-       g_object_set_data (G_OBJECT (fsel), "label", label);
-       g_object_set_data (G_OBJECT (fsel), "saved_flag", &saved_flag);
-
-       g_signal_connect (G_OBJECT (fsel->ok_button), "clicked",
-                         G_CALLBACK (save_as_ok_cb), fsel);
-
-       g_signal_connect (G_OBJECT (fsel->cancel_button), "clicked",
-                         G_CALLBACK (save_as_cancel_cb), fsel);
-
-       g_signal_connect (G_OBJECT (fsel), "destroy",
-                         G_CALLBACK (save_as_destroy_cb), &destroy_flag);
-
-       /* Recover proper state of save-as dialog */
-       if (save_path != NULL) {
-               gtk_file_selection_set_filename (fsel, save_path);
-       }
-
-       /* show the dialog */
-       gtk_widget_show (GTK_WIDGET (fsel));
-
-       /* Hold here and process events until we are done with this dialog. */
-       gtk_main ();
-
-       /* Destroy dialog if not already destroyed. */
-       if (!destroy_flag) {
-               /* Disconnect our destroy callback first, so that we don't
-                * kill the current gtk_main() loop. */
-               g_signal_handlers_disconnect_by_func (GTK_OBJECT (fsel),
-                                                     G_CALLBACK (save_as_destroy_cb),
-                                                     &destroy_flag);
-               gtk_widget_destroy (GTK_WIDGET (fsel));
-       }
-
-       g_free (title);
-
-       gl_debug (DEBUG_FILE, "END");
-
-       /* Return flag as set by one of the above callbacks, TRUE = saved */
-       return saved_flag;
-}
-
-/*---------------------------------------------------------------------------*/
-/* PRIVATE.  "Save As" ok button callback.                                   */
-/*---------------------------------------------------------------------------*/
-static void
-save_as_ok_cb (GtkWidget        *widget,
-              GtkFileSelection *fsel)
-{
-       gchar            *raw_filename, *filename, *full_filename;
-       GtkWidget        *dlg;
-       glLabel          *label;
-       glXMLLabelStatus  status;
-       EggRecentModel   *recent;
-       gboolean         *saved_flag;
-       gchar            *primary_msg;
-       gboolean          cancel_flag = FALSE;
-
-       gl_debug (DEBUG_FILE, "START");
-
-       g_return_if_fail (GTK_IS_FILE_SELECTION (fsel));
-
-       label = g_object_get_data (G_OBJECT(fsel), "label");
-       saved_flag = g_object_get_data (G_OBJECT(fsel), "saved_flag");
-
-       /* get the filename */
-       raw_filename = g_strdup (gtk_file_selection_get_filename (fsel));
-
-       gl_debug (DEBUG_FILE, "raw_filename = \"%s\"", raw_filename);
-
-       if (!raw_filename || g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) {
-
-               dlg = gl_hig_alert_new (GTK_WINDOW(fsel),
-                                       GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                       GTK_MESSAGE_WARNING,
-                                       GTK_BUTTONS_CLOSE,
-                                       _("Empty file name selection"),
-                                       _("Please supply a valid file name"));
-
-               gtk_dialog_run (GTK_DIALOG (dlg));
-               gtk_widget_destroy (dlg);
-
-       } else {
-
-               full_filename = gl_util_add_extension (raw_filename);
-
-               filename = g_filename_to_utf8 (full_filename, -1, NULL, NULL, NULL);
-
-               gl_debug (DEBUG_FILE, "filename = \"%s\"", filename);
-
-               if (g_file_test (full_filename, G_FILE_TEST_IS_REGULAR)) {
-                       gint ret;
-
-                       primary_msg = g_strdup_printf (_("Overwrite file \"%s\"?"),
-                                                      filename);
-
-                       dlg = gl_hig_alert_new (GTK_WINDOW(fsel),
-                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                               GTK_MESSAGE_QUESTION,
-                                               GTK_BUTTONS_YES_NO,
-                                               primary_msg,
-                                               _("File already exists."));
-                       
-                       g_free (primary_msg);
-
-                       ret = gtk_dialog_run (GTK_DIALOG (dlg));
-                       if ( ret == GTK_RESPONSE_NO ) {
-                               cancel_flag = TRUE;
-                       }
-                       gtk_widget_destroy (dlg);
-               }
-
-               if (!cancel_flag) {
-
-                       gl_xml_label_save (label, filename, &status);
-
-                       gl_debug (DEBUG_FILE, "status of save = %d", status);
-
-                       if ( status != XML_LABEL_OK ) {
-
-                               primary_msg = g_strdup_printf (_("Could not save file \"%s\""),
-                                                              filename);
-
-                               dlg = gl_hig_alert_new (GTK_WINDOW(fsel),
-                                                       GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                                       GTK_MESSAGE_ERROR,
-                                                       GTK_BUTTONS_CLOSE,
-                                                       primary_msg,
-                                                       _("Error encountered during save.  The file is still not saved."));
-
-                               g_free (primary_msg);
-
-                               gtk_dialog_run (GTK_DIALOG (dlg));
-                               gtk_widget_destroy (dlg);
-
-                       } else {
-
-                               *saved_flag = TRUE;
-
-                               gl_recent_add_uri (filename);
-
-                               if (save_path != NULL)
-                                       g_free (save_path);
-                               save_path = g_path_get_dirname (filename);
-                               if (save_path != NULL)
-                                       save_path = g_strconcat (save_path, "/", NULL);
-
-                               gtk_widget_destroy (GTK_WIDGET (fsel));
-                       }
-
-               }
-
-               g_free (filename);
-               g_free (full_filename);
-       }
-
-       g_free (raw_filename);
-
-       gl_debug (DEBUG_FILE, "END");
-}
-
-/*---------------------------------------------------------------------------*/
-/* PRIVATE.  "Save As" cancel button callback.                               */
-/*---------------------------------------------------------------------------*/
-static void
-save_as_cancel_cb (GtkWidget        *widget,
-                  GtkFileSelection *fsel)
-{
-       gboolean *saved_flag = g_object_get_data (G_OBJECT (fsel), "saved_flag");
-
-       g_return_if_fail (GTK_IS_FILE_SELECTION (fsel));
-
-       *saved_flag = FALSE;
-       gtk_widget_hide (GTK_WIDGET (fsel));
-       gtk_main_quit ();
-}
-
-/*---------------------------------------------------------------------------*/
-/* PRIVATE.  "Save As" destroy callback.                                     */
-/*---------------------------------------------------------------------------*/
-static void
-save_as_destroy_cb (GtkWidget *widget,
-                   gboolean  *destroy_flag)
-{
-       *destroy_flag = TRUE;
-       gtk_main_quit ();
-}
-
-#endif
 
 /*****************************************************************************/
 /* "Close" menu callback.                                                    */
index 509836b92095f746096d9288eece3856e38c78e2..ca307535c15968da315f7c9c7d22eea46ab54700 100644 (file)
@@ -22,7 +22,8 @@
 
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
+#include <libgnome/libgnome.h>
 #include <libgnomeprint/gnome-print-job.h>
 
 #include "merge-init.h"
index 0414be1c4235617dfd574cc1baf3ac6388c5a01f..f241841e041767cdd2edc41eb36ae0791367bb69 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <libgnome/libgnome.h>
 #include <libgnomeui/libgnomeui.h>
 #include <libgnomeui/gnome-window-icon.h>
index e2e097bf7acd54f2e2706b7bb2e64cfaf95038b8..678427f534e9d641d5295a89d3b9be2b8b768afa 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "label.h"
 #include "label-object.h"
index a5e585af18c4230762debd5994598336dedfc1ec..cb6f2632573ffb4c7efc4b4cae0dde5ea88eaeda 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "merge-init.h"
 #include "merge-text.h"
index 1eca27e8f137be45edf475d74de851908fce0329..e76bdfaa7c90f605a95c6fb04402dd2b02f2c1f5 100644 (file)
@@ -21,6 +21,8 @@
  */
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "view.h"
 #include "merge.h"
 #include "merge-properties-dialog.h"
index d5f2b87d9e030bfabf688246544edc8733146b2a..2edebc104d373d243b929ae9131408a88cd408c4 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 #include <gobject/gvaluecollector.h>
 #include <string.h>
 
index 19b239cd6e7a4dfd1ea80c0c5bcf1d2484bfa153..ac4f08f5f7fa1f781e9b8729f33a4e856a223baf 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 #include <glade/glade-xml.h>
 #include <math.h>
 
index 2f5d42ab701784551c1403244d9216daa69e2f5d..b5f43dd8c0272925f744447272d69d7d87ad7888 100644 (file)
@@ -21,6 +21,7 @@
  */
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <libgnome/libgnome.h>
 #include <libgnomeui/libgnomeui.h>
 #include <glade/glade-xml.h>
index 4f5bcde9983fc9a25a8b1bce07522a8b56cf65d0..9dc59790ba7cc700ba8616b2f22621b8bcb0434c 100644 (file)
@@ -21,7 +21,7 @@
  */
 #include <config.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "prefs-model.h"
 
index 62fbf0d01ae3e21717763f3107663bad4905b521..f0d9de39baef7e23c98969d65367c025d7e9bd46 100644 (file)
@@ -21,6 +21,7 @@
  */
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <math.h>
 #include <time.h>
 #include <ctype.h>
index c691482216e382ab5180904c903ea67e2ccf15bd..573ef143e9984bc6dd7323c9a6a4aadbddd01f91 100644 (file)
@@ -21,6 +21,7 @@
  */
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <math.h>
 #include <time.h>
 #include <ctype.h>
index f6235e3ba0f175170f6c8035ed9c66d21bf91bb6..98afb93239e8c0b6d3685d388156a1c80e624c37 100644 (file)
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtkiconfactory.h>
+#include <gtk/gtkstock.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
 #include "stock.h"
 #include "stock-pixmaps/stockpixbufs.h"
index 18b6d78f6fd6f248e41b4607e57c7de37d829b41..22f4f5f40b8198ea8658077c348e49d5ce7b4fc4 100644 (file)
@@ -21,6 +21,7 @@
  */
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <math.h>
 #include <libgnome/libgnome.h>
 #include <libgnomeui/libgnomeui.h>
index 17433bf15be1224ddf773ac7c7b802f2b66b9e5c..bd7fc83784885e1a5109ebf429f3bcb4472e252c 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <libgnomeprint/gnome-font.h>
 
 #include "ui-property-bar.h"
index 4487f13b213bcfd5aafe81a77f4dc4958fc07a0f..90f0d70ea1d626bb1b88e9c55ab26fc7ea262a2f 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <libgnomeprint/gnome-font.h>
 
 #include "ui-sidebar.h"
index 61cb043fe534b99357477b2610e627e7be6e3271..70f9d4e8cc23fce5f491f963ba414a508ee7a41b 100644 (file)
@@ -22,7 +22,7 @@
 #include <config.h>
 
 #include <glib.h>
-
+#include <glib/gi18n.h>
 #include <libgnomeprint/gnome-glyphlist.h>
 
 #include "view-barcode.h"
index d61ec0327e7be856611992f4bd4310eba2e810de..bd05217f58f6cb7e7b618e84422a339b95c79243 100644 (file)
@@ -22,9 +22,9 @@
 #include <config.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "view-box.h"
-
 #include "view-highlight.h"
 
 #include "color.h"
index f4d141230643c661f2c39e509d67b0d1996a78a1..e8d99bbc703c33216009d2b56a4ef6563fe7cbed 100644 (file)
@@ -22,9 +22,9 @@
 #include <config.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "view-ellipse.h"
-
 #include "view-highlight.h"
 
 #include "color.h"
index eb122e9a5d5bdd7f17d9523e245a3c73d2a27d25..42f3ab064e9ca12b9883e416950d12616495ae10 100644 (file)
@@ -22,9 +22,9 @@
 #include <config.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "view-image.h"
-
 #include "view-highlight.h"
 
 #include "color.h"
index 67e42245e99011eb15871cce0a2b51c86e0b8f3a..3c2b9f82b8470f260b33cbae499468bf5980a6bb 100644 (file)
@@ -22,9 +22,9 @@
 #include <config.h>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "view-line.h"
-
 #include "view-highlight.h"
 
 #include "color.h"
index 9e5a054a3ae4e676a74091ac708885db9b8bc18c..f6c5bfd20a9a5c5419e3e0c96b38fb7533d4a0d4 100644 (file)
@@ -22,7 +22,7 @@
 #include <config.h>
 
 #include <glib.h>
-
+#include <glib/gi18n.h>
 #include <libgnomeprint/gnome-glyphlist.h>
 
 #include "view-text.h"
index bd456d3a6d437ea91af6bec1cfb937bd519209ce..c302dccaad4f986f978870a6e4d9171cb6b85a73 100644 (file)
@@ -22,9 +22,9 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkinvisible.h>
-
 #include <string.h>
 #include <math.h>
 
index 3b8e044f1e481823fa5fb61d1461e960f22900ee..ff50938b08e66646b309eb7af6187e8b47e24fd7 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "wdgt-image-select.h"
 #include "merge.h"
 #include "marshal.h"
index 6ad73a0c77e5090de9388d306fddaedc06388eb3..18706503e11c017672f67458ab1cf5c173ac9944 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "wdgt-media-select.h"
 #include "hig.h"
 #include "wdgt-mini-preview.h"
index ca202671f5ffe9543a1f9bf82609c4a0d8fc9aec..d98e93e9d3f0bd75235c21b3ca0a63d1bd972d4e 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "wdgt-print-copies.h"
 #include "wdgt-mini-preview.h"
 #include "marshal.h"
index 290e6a28db84031328620b46376835c68f5107ba..578863a4d41b83a56fd11c1088a2023bf77c0226 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "wdgt-print-merge.h"
 #include "wdgt-mini-preview.h"
 #include "marshal.h"
index e8d21884c95641baf82cc4bd6d3247f99285d33d..ba9d35a3201405b3f87487167cc908e2de4d3e73 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
 #include <math.h>
 
 #include "wdgt-rotate-label.h"
index 8ab466366b74671e139f7da49f50cba6dbc8d65a..fdbcf09118e0c9a979872f15e8ca4590517ff5f4 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <config.h>
 
+#include <glib/gi18n.h>
+
 #include "ui.h"
 #include "window.h"
 #include "util.h"
index aebce11402e273eb1d0ff2671cb5ef7e3f81145f..6506ec9aafd5e0e6ff6f8033d96f003046a28d81 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <gnome.h>
 
+#include <glib/gi18n.h>
+
 #include "xml-label-04.h"
 #include "label-text.h"
 #include "label-box.h"
index 54d83f2b8462ca94a5db6eb2529684d138f385ad..4327d684b2b08208cbeac97f71b9e17ffcb212be 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <gnome.h>
 
+#include <glib/gi18n.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
index f420a2d2c438efc9463f7192e43de63a3519794e..8b0f53c2ef55e06a1c2a05b3f10251f2352551b1 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <gnome.h>
 
+#include <glib/gi18n.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 #include <gdk-pixbuf/gdk-pixdata.h>