Commit bf17419b authored by Gustavo Giraldez's avatar Gustavo Giraldez Committed by Gustavo Giráldez

Removed old macros and dependencies.

2003-01-12  Gustavo Giraldez  <gustavo.giraldez@gmx.net>

	* configure.in: Removed old macros and dependencies.

	* gdl/default-icon.[ch]:
	* gdl/layout.glade1:
	* gdl/gdl-file-selector-util.[ch]: Removed obsolete files from CVS.

	* gdl/gdl-i18n.[ch]: New files used for internationalization of
	the library.

	* symbol-browser-control/Makefile.am:
	* gdl/Makefile.am: Removed old defines.  Removed files from build.
	Added files necessary for internationalization.

	* gdl/gdl-data-frame.[ch]:
	* gdl/gdl-data-model-test.c:
	* gdl/gdl-data-model.c:
	* gdl/gdl-data-row.[ch]:
	* gdl/gdl-data-view.[ch]:
	* gdl/gdl-dock-item-grip.c:
	* gdl/gdl-dock-item.c:
	* gdl/gdl-dock-layout.c:
	* gdl/gdl-dock-master.c:
	* gdl/gdl-dock-notebook.c:
	* gdl/gdl-dock-object.c:
	* gdl/gdl-dock-paned.c:
	* gdl/gdl-dock-placeholder.c:
	* gdl/gdl-dock-tablabel.c:
	* gdl/gdl-dock.c:
	* gdl/gdl-icons.c:
	* gdl/gdl-recent.c:
	* gdl/gdl-tools.[ch]:
	* symbol-browser-control/factory.c:
	* symbol-browser-control/symbol-browser.[ch]:
	* symbol-browser-control/test-symbol-browser.c: Fix up files for
	i18n.  Include config.h file.  Remove some unnecessary includes.
parent a10d6a59
2003-01-12 Gustavo Giraldez <gustavo.giraldez@gmx.net>
* configure.in: Removed old macros and dependencies.
* gdl/default-icon.[ch]:
* gdl/layout.glade1:
* gdl/gdl-file-selector-util.[ch]: Removed obsolete files from CVS.
* gdl/gdl-i18n.[ch]: New files used for internationalization of
the library.
* symbol-browser-control/Makefile.am:
* gdl/Makefile.am: Removed old defines. Removed files from build.
Added files necessary for internationalization.
* gdl/gdl-data-frame.[ch]:
* gdl/gdl-data-model-test.c:
* gdl/gdl-data-model.c:
* gdl/gdl-data-row.[ch]:
* gdl/gdl-data-view.[ch]:
* gdl/gdl-dock-item-grip.c:
* gdl/gdl-dock-item.c:
* gdl/gdl-dock-layout.c:
* gdl/gdl-dock-master.c:
* gdl/gdl-dock-notebook.c:
* gdl/gdl-dock-object.c:
* gdl/gdl-dock-paned.c:
* gdl/gdl-dock-placeholder.c:
* gdl/gdl-dock-tablabel.c:
* gdl/gdl-dock.c:
* gdl/gdl-icons.c:
* gdl/gdl-recent.c:
* gdl/gdl-tools.[ch]:
* symbol-browser-control/factory.c:
* symbol-browser-control/symbol-browser.[ch]:
* symbol-browser-control/test-symbol-browser.c: Fix up files for
i18n. Include config.h file. Remove some unnecessary includes.
2003-01-07 German Poo-Caaman~o <gpoo@ubiobio.cl>
* configure.in: Added Spanish (es) to ALL_LINGUAS.
......
......@@ -6,7 +6,7 @@ dnl
dnl ==========================================================================
AC_PREREQ(2.13)
AC_PREREQ(2.53)
AC_INIT(gdl)
AM_CONFIG_HEADER(config.h)
......@@ -33,20 +33,21 @@ GNOME_REQUIRED=2.1.0
BONOBOUI_REQUIRED=1.108.1
XML_REQUIRED=2.2.8
LIBGLADE_REQUIRED=1.99.5
LIBRSVG_REQUIRED=1.1.1
AC_SUBST(GTK_REQUIRED)
AC_SUBST(GNOME_REQUIRED)
AC_SUBST(BONOBOUI_REQUIRED)
AC_SUBST(XML_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBRSVG_REQUIRED)
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AC_CHECK_HEADERS([libintl.h])
AC_TYPE_SIGNAL
dnl =====================================================================
dnl ======== Ctags stuffs below =========================================
......@@ -70,7 +71,6 @@ AC_DEFUN(CHECK_HEADER_DEFINE,
]) ])
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
......@@ -85,8 +85,6 @@ AC_CHECK_HEADERS(time.h types.h unistd.h)
AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CYGWIN
AC_MINGW32
AC_C_CONST
AC_OBJEXT
AC_EXEEXT
......@@ -247,7 +245,6 @@ dnl ========== ctags stuffs ends =======================================
dnl =====================================================================
AC_PROG_CXX
AC_PROG_YACC
AC_STDC_HEADERS
AM_PROG_LIBTOOL
AM_SANITY_CHECK
......@@ -262,15 +259,12 @@ dnl ***************
PKG_CHECK_MODULES(XML, libxml-2.0 >= $XML_REQUIRED)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
AC_SUBST(GAL_LIBS)
PKG_CHECK_MODULES(GDL_DEPENDENCIES,
gtk+-2.0 >= $GTK_REQUIRED
libgnome-2.0 >= $GNOME_REQUIRED
libgnomeui-2.0 >= $GNOME_REQUIRED
libbonoboui-2.0 >= $BONOBOUI_REQUIRED
libglade-2.0 >= $LIBGLADE_REQUIRED
librsvg-2.0 >= $LIBRSVG_REQUIRED)
libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(GDL_DEPENDENCIES_CFLAGS)
AC_SUBST(GDL_DEPENDENCIES_LIBS)
......@@ -284,12 +278,6 @@ AC_SUBST(LIBBONOBO_IDL_DIR)
BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
NAUTILUS_THEMEDIR="`$PKG_CONFIG --variable=prefix libnautilus`/share/pixmaps/nautilus"
AC_SUBST(NAUTILUS_THEMEDIR)
GNOME_VFS_ICONDIR="`$PKG_CONFIG --variable=prefix gnome-vfs-2.0`/share/pixmaps/document-icons"
AC_SUBST(GNOME_VFS_ICONDIR)
# marshal and enum generators
GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
AC_SUBST(GLIB_GENMARSHAL)
......@@ -297,18 +285,12 @@ GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
AC_SUBST(GLIB_MKENUMS)
ALL_LINGUAS="az cs da de el es fr it pt ru sv vi"
GETTEXT_PACKAGE=gdl-1
GETTEXT_PACKAGE="gdl-1"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name for gettext])
AC_DEFINE_UNQUOTED(GNOME_EXPLICIT_TRANSLATION_DOMAIN, "$GETTEXT_PACKAGE",
[Domain for gettext translation])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
AM_GLIB_GNU_GETTEXT
# AM_GNOME2_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gnomelocaledir)
AM_GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)
AC_OUTPUT([
Makefile
......
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locales"\" \
-DG_LOG_DOMAIN=\"Gdl\" \
-DGDL_GLADEDIR=\""$(gladedir)"\" \
-DG_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-I$(includedir) -I$(top_srcdir) \
$(WARN_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DNAUTILUS_THEMEDIR=\""$(NAUTILUS_THEMEDIR)"\" \
-DGNOME_VFS_ICONDIR=\""$(GNOME_VFS_ICONDIR)"\" \
$(GDL_DEPENDENCIES_CFLAGS) $(XML_CFLAGS)
lib_LTLIBRARIES = libgdl-1.la
......@@ -48,10 +42,27 @@ CLEANFILES = $(CORBA_GENERATED) \
libgdlmarshal.c \
libgdlmarshal.h
libgdl_headers = \
gdl.h \
gdl-tools.h \
gdl-dock-object.h \
gdl-dock-master.h \
gdl-dock.h \
gdl-dock-item.h \
gdl-dock-item-grip.h \
gdl-dock-notebook.h \
gdl-dock-paned.h \
gdl-dock-tablabel.h \
gdl-dock-layout.h \
gdl-dock-placeholder.h \
gdl-icons.h \
gdl-recent.h
libgdl_1_la_SOURCES = \
$(CORBA_GENERATED) \
default-icon.c \
default-icon.h \
$(libgdl_headers) \
gdl-i18n.h \
gdl-i18n.c \
gdl-tools.c \
gdl-dock-object.c \
gdl-dock-master.c \
......@@ -64,15 +75,12 @@ libgdl_1_la_SOURCES = \
gdl-dock-layout.c \
gdl-dock-placeholder.c \
gdl-icons.c \
gdl-file-selector-util.c \
gdl-recent.c \
libgdltypebuiltins.h \
libgdltypebuiltins.c \
libgdlmarshal.h \
libgdlmarshal.c
$(libgdl_1_la_OBJECTS): \
libgdltypebuiltins.h \
libgdlmarshal.h
libgdl_1_la_LIBADD = \
$(GDL_DEPENDENCIES_LIBS) \
$(XML_LIBS)
......@@ -82,23 +90,6 @@ noinst_PROGRAMS=test-dock test-dataview
test_dock_sources=test-dock.c
test_dock_LDADD=libgdl-1.la $(XML_LIBS)
libgdl_headers = \
gdl.h \
gdl-tools.h \
gdl-dock-object.h \
gdl-dock-master.h \
gdl-dock.h \
gdl-dock-item.h \
gdl-dock-item-grip.h \
gdl-dock-notebook.h \
gdl-dock-paned.h \
gdl-dock-tablabel.h \
gdl-dock-layout.h \
gdl-dock-placeholder.h \
gdl-icons.h \
gdl-file-selector-util.h \
gdl-recent.h
libgdlincludedir = $(includedir)/libgdl-1.0/gdl
libgdlinclude_HEADERS = \
$(CORBA_GENERATED_HEADER_FILES) \
......@@ -114,12 +105,6 @@ EXTRA_DIST = libgdlmarshal.list \
layout.glade \
program.xpm static.xpm shared.xpm
## layout.glade1 is out of date!
# layout.glade: layout.glade1 $(LIBGLADE_CONVERT)
# $(LIBGLADE_CONVERT) layout.glade1 > layout.glade.tmp && \
# mv layout.glade.tmp layout.glade
test_dataview_SOURCES = \
gdl-data-view.h \
gdl-data-view.c \
......@@ -133,7 +118,7 @@ test_dataview_SOURCES = \
gdl-data-row.c \
test-dataview.c
test_dataview_LDADD = $(GDL_DEPENDENCIES_LIBS)
test_dataview_LDADD = libgdl-1.la
# enumerations code generation
......
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
Default file icon used by the icon factory.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Darin Adler <darin@bentspoon.com>
*/
#ifndef DEFAULT_FILE_ICON_H
#define DEFAULT_FILE_ICON_H
extern const int default_icon_width;
extern const int default_icon_height;
extern const unsigned char default_icon[];
#endif /* DEFAULT_ICON_H */
......@@ -20,15 +20,19 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <libgnome/gnome-macros.h>
#include "gdl-data-view.h"
#include "gdl-data-frame.h"
#include "gdl-data-model.h"
#include <libgnome/libgnome.h>
#include "gdl-data-row.h"
#include <string.h>
struct _GdlDataFramePrivate {
GdkRectangle shadow_r;
......
......@@ -24,7 +24,7 @@
#define GDL_DATA_FRAME_H
#include <glib-object.h>
#include "gdl-data-row.h"
#include <gdl/gdl-data-row.h>
G_BEGIN_DECLS
......
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include "gdl-data-model-test.h"
#include "gdl-data-model.h"
......
......@@ -20,7 +20,10 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-data-model.h"
gboolean
......
......@@ -20,13 +20,15 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "gdl-data-row.h"
#endif
#include "gdl-i18n.h"
#include "gdl-data-row.h"
#include "gdl-data-model.h"
#include <libgnome/gnome-macros.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtkcellrenderer.h>
......@@ -555,11 +557,12 @@ gdl_data_row_event (GdlDataRow *row, GdkEvent *event,
GtkCellEditable **editable_widget)
{
switch (((GdkEventAny *)event)->type) {
case GDK_BUTTON_PRESS :
return button_press_event (row,
(GdkEventButton *)event,
editable_widget);
default :
case GDK_BUTTON_PRESS:
return button_press_event (row,
(GdkEventButton *)event,
editable_widget);
default:
break;
}
return FALSE;
}
......
......@@ -28,7 +28,7 @@
#include <glib-object.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtkcellrenderer.h>
#include "gdl-data-view.h"
#include <gdl/gdl-data-view.h>
G_BEGIN_DECLS
......
......@@ -20,15 +20,20 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <libgnome/gnome-macros.h>
#include "gdl-data-view.h"
#include "gdl-data-frame.h"
#include "tree-expand.xpm"
#include "tree-contract.xpm"
#include <libgnome/libgnome.h>
#include "gdl-data-frame.h"
struct _GdlDataViewPrivate {
GList *frames;
GList *rows;
......
......@@ -23,7 +23,7 @@
#ifndef GDL_DATA_VIEW_H
#define GDL_DATA_VIEW_H
#include "gdl-data-model.h"
#include <gdl/gdl-data-model.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
......
......@@ -10,6 +10,11 @@
* Copyright (C) 2002 Sun Microsystems, Inc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <glib-object.h>
#include <atk/atkstateset.h>
......
......@@ -28,6 +28,11 @@
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <libgnome/gnome-macros.h>
#include <gdk/gdkkeysyms.h>
......
......@@ -20,6 +20,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <stdlib.h>
#include <libxml/parser.h>
......@@ -624,9 +629,8 @@ load_interface (const gchar *top_widget)
gchar *gui_file;
/* load ui */
/* FIXME: set the translation domain here */
gui_file = g_build_filename (GDL_GLADEDIR, LAYOUT_GLADE_FILE, NULL);
gui = glade_xml_new (gui_file, top_widget, NULL);
gui = glade_xml_new (gui_file, top_widget, GETTEXT_PACKAGE);
g_free (gui_file);
if (!gui) {
/* FIXME: pop up an error dialog */
......
......@@ -22,6 +22,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <libgnome/gnome-macros.h>
#include <gdk/gdkx.h>
......
......@@ -20,6 +20,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <gtk/gtknotebook.h>
#include <libgnome/gnome-macros.h>
......
......@@ -22,6 +22,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <libgnome/gnome-macros.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -22,6 +22,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <gtk/gtkhpaned.h>
#include <gtk/gtkvpaned.h>
......
......@@ -22,6 +22,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <libgnome/gnome-macros.h>
#include "gdl-tools.h"
......
......@@ -22,6 +22,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <libgnome/gnome-macros.h>
#include <gtk/gtk.h>
......
......@@ -20,6 +20,11 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <stdlib.h>
#include <string.h>
#include <gdk/gdkx.h>
......
/*
* gdl-file-selector-util.h - functions for getting files from a
* selector
*
* Authors:
* Jacob Berkman <jacob@ximian.com>
*
* Copyright 2001 Ximian, Inc.
*
*/
#include "gdl-file-selector-util.h"
#include "gdl-tools.h"
#include <string.h>
#include <stdlib.h>
#include <glib.h>
#include <bonobo/bonobo-event-source.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-widget.h>
#include <gtk/gtk.h>
#include <libgnome/gnome-program.h>
#include <libgnome/gnome-i18n.h>
#define GET_MODE(w) (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (w), "GdlFileSelectorMode")))
#define SET_MODE(w, m) (g_object_set_data (G_OBJECT (w), "GdlFileSelectorMode", GINT_TO_POINTER (m)))
typedef enum {
FILESEL_OPEN,
FILESEL_OPEN_MULTI,
FILESEL_SAVE
} FileselMode;
static gint
delete_file_selector (GtkWidget *d, GdkEventAny *e, gpointer data)
{
gtk_widget_hide (d);
gtk_main_quit ();
return TRUE;
}
static void
listener_cb (BonoboListener *listener,
const char *event_name,
const CORBA_any *any,
CORBA_Environment *ev,
gpointer data)
{
GtkWidget *dialog;
CORBA_sequence_CORBA_string *seq;
char *subtype;
dialog = data;
gtk_widget_hide (dialog);
subtype = bonobo_event_subtype (event_name);
if (!strcmp (subtype, "Cancel"))
goto cancel_clicked;
seq = any->_value;
if (seq->_length < 1)
goto cancel_clicked;
if (GET_MODE (dialog) == FILESEL_OPEN_MULTI) {
char **strv;
int i;
if (seq->_length == 0)
goto cancel_clicked;
strv = g_new (char *, seq->_length + 1);
for (i = 0; i < seq->_length; i++)
strv[i] = g_strdup (seq->_buffer[i]);
strv[i] = NULL;
g_object_set_data (G_OBJECT (dialog), "user_data", strv);
} else {
g_object_set_data (G_OBJECT (dialog), "user_data",
g_strdup (seq->_buffer[0]));
}
cancel_clicked:
g_free (subtype);
gtk_main_quit ();
}
static BonoboWidget *
create_control (gboolean enable_vfs, FileselMode mode)
{
GtkWidget *control;
char *moniker;
moniker = g_strdup_printf (
"OAFIID:GNOME_FileSelector_Control!"
"Application=%s;"
"EnableVFS=%d;"
"MultipleSelection=%d;"
"SaveMode=%d",
gnome_program_get_app_id (gnome_program_get ()),
enable_vfs,
mode == FILESEL_OPEN_MULTI,
mode == FILESEL_SAVE);
control = bonobo_widget_new_control (moniker, CORBA_OBJECT_NIL);
g_free (moniker);
return control ? BONOBO_WIDGET (control) : NULL;
}
static GtkWindow *
create_bonobo_selector (gboolean enable_vfs,
FileselMode mode,
const char *mime_types,
const char *default_path,
const char *default_filename)
{
GtkWidget *dialog;
BonoboWidget *control;
control = create_control (enable_vfs, mode);
if (!control)
return NULL;
dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (dialog), GTK_WIDGET (control));
gtk_widget_set_size_request (dialog, 560, 450);
bonobo_event_source_client_add_listener (
bonobo_widget_get_objref (control),
listener_cb,
"GNOME/FileSelector/Control:ButtonClicked",
NULL, dialog);
if (mime_types)
bonobo_widget_set_property (
control, "MimeTypes", mime_types, NULL);
if (default_path)
bonobo_widget_set_property (
control, "DefaultLocation", default_path, NULL);
if (default_filename)
bonobo_widget_set_property (
control, "DefaultFileName", default_filename, NULL);
return GTK_WINDOW (dialog);
}