aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus
diff options
context:
space:
mode:
authorMike Kestner <mkestner@src.gnome.org>2002-11-01 05:30:57 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-11-01 05:30:57 +0800
commit613453b1095e325149b8d37e5731d415e1d5f9bd (patch)
tree1c0d7f9be4d4a87aa67d8e185ae2bb23d02254b7 /widgets/menus
parentec242d6c30d7bf056c8f59710b8576c942f93583 (diff)
downloadgsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.gz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.bz2
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.lz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.xz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.zst
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.zip
merging the gal-2 branch back to the trunk.
merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471
Diffstat (limited to 'widgets/menus')
-rw-r--r--widgets/menus/gal-define-views-dialog.c13
-rw-r--r--widgets/menus/gal-define-views-model.c12
-rw-r--r--widgets/menus/gal-view-collection.c20
-rw-r--r--widgets/menus/gal-view-collection.h6
-rw-r--r--widgets/menus/gal-view-etable.c7
-rw-r--r--widgets/menus/gal-view-etable.h6
-rw-r--r--widgets/menus/gal-view-factory-etable.c3
-rw-r--r--widgets/menus/gal-view-factory.c6
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c9
-rw-r--r--widgets/menus/gal-view-instance.c9
-rw-r--r--widgets/menus/gal-view-instance.h7
-rw-r--r--widgets/menus/gal-view-new-dialog.c12
-rw-r--r--widgets/menus/gal-view.c4
-rw-r--r--widgets/menus/gal-view.h2
14 files changed, 64 insertions, 52 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index d692077d45..5eb08aac4b 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -26,7 +26,8 @@
#include "gal-define-views-dialog.h"
#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
#include <gal/e-table/e-table-scrolled.h>
@@ -225,7 +226,7 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
dialog->collection = NULL;
- gui = glade_xml_new_with_domain (GAL_GLADEDIR "/gal-define-views.glade", NULL, E_I18N_DOMAIN);
+ gui = glade_xml_new (GAL_GLADEDIR "/gal-define-views.glade", NULL, PACKAGE);
dialog->gui = gui;
widget = glade_xml_get_widget(gui, "table-top");
@@ -238,8 +239,8 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
gtk_widget_unref(widget);
gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_OK,
+ GTK_STOCK_CANCEL,
NULL);
gdvd_connect_signal(dialog, "button-new", "clicked", GTK_SIGNAL_FUNC(gdvd_button_new_callback));
@@ -264,7 +265,9 @@ gal_define_views_dialog_destroy (GtkObject *object)
{
GalDefineViewsDialog *gal_define_views_dialog = GAL_DEFINE_VIEWS_DIALOG(object);
- gtk_object_unref(GTK_OBJECT(gal_define_views_dialog->gui));
+ if (gal_define_views_dialog->gui)
+ gtk_object_unref(GTK_OBJECT(gal_define_views_dialog->gui));
+ gal_define_views_dialog->gui = NULL;
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index ca54e19c8d..eb41f3b84a 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-model.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -22,9 +22,9 @@
*/
#include <config.h>
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include "gal-define-views-model.h"
#define PARENT_TYPE e_table_model_get_type()
@@ -49,7 +49,9 @@ gdvm_destroy(GtkObject *object)
{
GalDefineViewsModel *model = GAL_DEFINE_VIEWS_MODEL(object);
- gtk_object_unref(GTK_OBJECT(model->collection));
+ if (model->collection)
+ gtk_object_unref(GTK_OBJECT(model->collection));
+ model->collection = NULL;
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 675c926bc1..acc96ccb1b 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-collection.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -27,8 +27,7 @@
#include <ctype.h>
#include <string.h>
#include <gtk/gtksignal.h>
-#include <gnome-xml/parser.h>
-#include <libgnome/gnome-defs.h>
+#include <libxml/parser.h>
#include <libgnome/gnome-util.h>
#include <gal/util/e-util.h>
#include <gal/util/e-xml-utils.h>
@@ -158,21 +157,23 @@ gal_view_collection_destroy (GtkObject *object)
for (i = 0; i < collection->view_count; i++) {
gal_view_collection_item_free (collection->view_data[i]);
}
- g_free(collection->view_data);
- collection->view_count = 0;
+ g_free (collection->view_data);
collection->view_data = NULL;
+ collection->view_count = 0;
- e_free_object_list(collection->factory_list);
+ e_free_object_list (collection->factory_list);
collection->factory_list = NULL;
for (i = 0; i < collection->removed_view_count; i++) {
gal_view_collection_item_free (collection->removed_view_data[i]);
}
g_free(collection->removed_view_data);
+ collection->removed_view_data = NULL;
collection->removed_view_count = 0;
- collection->removed_view_data = NULL;
g_free(collection->system_dir);
+ collection->system_dir = NULL;
+
g_free(collection->local_dir);
collection->system_dir = NULL;
collection->local_dir = NULL;
@@ -200,7 +201,7 @@ gal_view_collection_class_init (GtkObjectClass *object_class)
GTK_RUN_LAST,
E_OBJECT_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GalViewCollectionClass, display_view),
- gtk_marshal_NONE__OBJECT,
+ e_marshal_NONE__OBJECT,
GTK_TYPE_NONE, 1, GAL_VIEW_TYPE);
gal_view_collection_signals [CHANGED] =
@@ -241,7 +242,7 @@ gal_view_collection_init (GalViewCollection *collection)
* gal_view_collection_get_type:
*
*/
-guint
+GtkType
gal_view_collection_get_type (void)
{
static guint type = 0;
@@ -836,3 +837,4 @@ gal_view_collection_set_default_view (GalViewCollection *collection, const char
gal_view_collection_changed (collection);
collection->default_view_built_in = FALSE;
}
+
diff --git a/widgets/menus/gal-view-collection.h b/widgets/menus/gal-view-collection.h
index 68e7cae4b7..8ce6d1be82 100644
--- a/widgets/menus/gal-view-collection.h
+++ b/widgets/menus/gal-view-collection.h
@@ -26,10 +26,8 @@
#include <gtk/gtkobject.h>
#include <gal/menus/gal-view-factory.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
+G_BEGIN_DECLS
#define GAL_VIEW_COLLECTION_TYPE (gal_view_collection_get_type ())
#define GAL_VIEW_COLLECTION(o) (GTK_CHECK_CAST ((o), GAL_VIEW_COLLECTION_TYPE, GalViewCollection))
@@ -146,7 +144,7 @@ void gal_view_collection_set_default_view (GalViewColl
const char *id);
-END_GNOME_DECLS
+G_END_DECLS
#endif /* _GAL_VIEW_COLLECTION_H_ */
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index f81482435d..20b58cfb4a 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-etable.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -144,10 +144,15 @@ gal_view_etable_destroy (GtkObject *object)
gal_view_etable_detach (view);
g_free(view->title);
+ view->title = NULL;
+
if (view->spec)
gtk_object_unref(GTK_OBJECT(view->spec));
+ view->spec = NULL;
+
if (view->state)
gtk_object_unref(GTK_OBJECT(view->state));
+ view->state = NULL;
if (GTK_OBJECT_CLASS (gal_view_etable_parent_class)->destroy)
(* GTK_OBJECT_CLASS (gal_view_etable_parent_class)->destroy) (object);
diff --git a/widgets/menus/gal-view-etable.h b/widgets/menus/gal-view-etable.h
index 2fd001e583..0768d3ee93 100644
--- a/widgets/menus/gal-view-etable.h
+++ b/widgets/menus/gal-view-etable.h
@@ -24,7 +24,6 @@
#ifndef _GAL_VIEW_ETABLE_H_
#define _GAL_VIEW_ETABLE_H_
-#include <libgnome/gnome-defs.h>
#include <gtk/gtkobject.h>
#include <gal/menus/gal-view.h>
#include <gal/e-table/e-table-state.h>
@@ -32,7 +31,7 @@
#include <gal/e-table/e-table.h>
#include <gal/e-table/e-tree.h>
-BEGIN_GNOME_DECLS
+G_BEGIN_DECLS
#define GAL_VIEW_ETABLE_TYPE (gal_view_etable_get_type ())
#define GAL_VIEW_ETABLE(o) (GTK_CHECK_CAST ((o), GAL_VIEW_ETABLE_TYPE, GalViewEtable))
@@ -73,6 +72,7 @@ void gal_view_etable_attach_tree (GalViewEtable *view,
ETree *tree);
void gal_view_etable_detach (GalViewEtable *view);
-END_GNOME_DECLS
+
+G_END_DECLS
#endif /* _GAL_VIEW_ETABLE_H_ */
diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c
index 026d085145..1e68c1b4ae 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-factory-etable.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -58,6 +58,7 @@ gal_view_factory_etable_destroy (GtkObject *object)
if (factory->spec)
gtk_object_unref(GTK_OBJECT(factory->spec));
+ factory->spec = NULL;
if (GTK_OBJECT_CLASS (gal_view_factory_etable_parent_class)->destroy)
(* GTK_OBJECT_CLASS (gal_view_factory_etable_parent_class)->destroy) (object);
diff --git a/widgets/menus/gal-view-factory.c b/widgets/menus/gal-view-factory.c
index 0f0d274b06..7655fd8e90 100644
--- a/widgets/menus/gal-view-factory.c
+++ b/widgets/menus/gal-view-factory.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-factory.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -24,7 +24,7 @@
#include <config.h>
#include "gal-view-factory.h"
-#define GVF_CLASS(e) ((GalViewFactoryClass *)((GtkObject *)e)->klass)
+#define GVF_CLASS(e) ((GalViewFactoryClass *)(GTK_OBJECT_GET_CLASS (e)))
#define PARENT_TYPE gtk_object_get_type ()
@@ -41,7 +41,7 @@ static GtkObjectClass *gal_view_factory_parent_class;
* Returns: The title of the factory.
*/
const char *
-gal_view_factory_get_title (GalViewFactory *factory)
+gal_view_factory_get_title (GalViewFactory *factory)
{
g_return_val_if_fail (factory != NULL, 0);
g_return_val_if_fail (GAL_IS_VIEW_FACTORY (factory), 0);
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index c00937b46f..5ac6dde416 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -26,11 +26,14 @@
#include "gal-view-instance-save-as-dialog.h"
#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
#include <gal/e-table/e-table-scrolled.h>
#include <gal/util/e-i18n.h>
+#include <gtk/gtknotebook.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkbox.h>
static GnomeDialogClass *parent_class = NULL;
#define PARENT_TYPE gnome_dialog_get_type()
@@ -102,7 +105,7 @@ gvisad_connect_signal(GalViewInstanceSaveAsDialog *dialog, char *widget_name, ch
widget = glade_xml_get_widget(dialog->gui, widget_name);
if (widget)
- gtk_signal_connect(GTK_OBJECT(widget), signal, handler, dialog);
+ g_signal_connect (G_OBJECT (widget), signal, G_CALLBACK (handler), dialog);
}
/* Method override implementations */
@@ -284,7 +287,7 @@ gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog)
{
GalView *view = gal_view_instance_get_current_view (dialog->instance);
GtkWidget *widget;
- char *title;
+ const char *title;
int n;
const char *id = NULL;
switch (dialog->toggle) {
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 1cc0389f47..ebe823357f 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -27,8 +27,7 @@
#include <ctype.h>
#include <string.h>
#include <gtk/gtksignal.h>
-#include <gnome-xml/parser.h>
-#include <libgnome/gnome-defs.h>
+#include <libxml/parser.h>
#include <libgnome/gnome-util.h>
#include <libgnomeui/gnome-dialog.h>
#include <gal/util/e-util.h>
@@ -230,7 +229,7 @@ gal_view_instance_init (GalViewInstance *instance)
* gal_view_instance_get_type:
*
*/
-guint
+GtkType
gal_view_instance_get_type (void)
{
static guint type = 0;
@@ -505,7 +504,7 @@ view_item_cb (GtkWidget *widget,
static void
add_popup_radio_item (EPopupMenu *menu_item,
gchar *title,
- void (*fn) (GtkWidget *widget, gpointer closure),
+ GtkSignalFunc fn,
gpointer closure,
gboolean value)
{
@@ -522,7 +521,7 @@ add_popup_radio_item (EPopupMenu *menu_item,
static void
add_popup_menu_item (EPopupMenu *menu_item,
gchar *title,
- void (*fn) (GtkWidget *widget, gpointer closure),
+ GtkSignalFunc fn,
gpointer closure)
{
const EPopupMenu menu_item_struct =
diff --git a/widgets/menus/gal-view-instance.h b/widgets/menus/gal-view-instance.h
index 5e5ea6817e..bc396af231 100644
--- a/widgets/menus/gal-view-instance.h
+++ b/widgets/menus/gal-view-instance.h
@@ -27,10 +27,8 @@
#include <gtk/gtkobject.h>
#include <gal/menus/gal-view-collection.h>
#include <gal/widgets/e-popup-menu.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
+G_BEGIN_DECLS
#define GAL_VIEW_INSTANCE_TYPE (gal_view_instance_get_type ())
#define GAL_VIEW_INSTANCE(o) (GTK_CHECK_CAST ((o), GAL_VIEW_INSTANCE_TYPE, GalViewInstance))
@@ -113,7 +111,6 @@ EPopupMenu *gal_view_instance_get_popup_menu (GalViewInstance *inst
void gal_view_instance_free_popup_menu (GalViewInstance *instance,
EPopupMenu *menu);
-END_GNOME_DECLS
-
+G_END_DECLS
#endif /* _GAL_VIEW_INSTANCE_H_ */
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 41b4ea4c69..6c858d141b 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -23,7 +23,7 @@
#include <config.h>
#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gtk/gtk.h>
#include "gal-view-new-dialog.h"
#include "gal-define-views-model.h"
#include <gal/widgets/e-unicode.h>
@@ -94,7 +94,7 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
GladeXML *gui;
GtkWidget *widget;
- gui = glade_xml_new_with_domain (GAL_GLADEDIR "/gal-view-new-dialog.glade", NULL, PACKAGE);
+ gui = glade_xml_new (GAL_GLADEDIR "/gal-view-new-dialog.glade", NULL, PACKAGE);
dialog->gui = gui;
widget = glade_xml_get_widget(gui, "table-top");
@@ -107,8 +107,8 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
gtk_widget_unref(widget);
gnome_dialog_append_buttons(GNOME_DIALOG(dialog),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
+ GTK_STOCK_OK,
+ GTK_STOCK_CANCEL,
NULL);
gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, TRUE, FALSE);
@@ -122,7 +122,9 @@ gal_view_new_dialog_destroy (GtkObject *object)
{
GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object);
- gtk_object_unref(GTK_OBJECT(gal_view_new_dialog->gui));
+ if (gal_view_new_dialog->gui)
+ gtk_object_unref(GTK_OBJECT(gal_view_new_dialog->gui));
+ gal_view_new_dialog->gui = NULL;
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index cfaf5dabaa..0645367fb9 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -26,7 +26,7 @@
#include "gal-view.h"
#include "gal/util/e-util.h"
-#define GV_CLASS(e) ((GalViewClass *)((GtkObject *)e)->klass)
+#define GV_CLASS(e) ((GalViewClass *)(GTK_OBJECT_GET_CLASS (e)))
#define PARENT_TYPE gtk_object_get_type ()
diff --git a/widgets/menus/gal-view.h b/widgets/menus/gal-view.h
index 3d617df25f..e47a4fb6e1 100644
--- a/widgets/menus/gal-view.h
+++ b/widgets/menus/gal-view.h
@@ -25,7 +25,7 @@
#define _GAL_VIEW_H_
#include <gtk/gtkobject.h>
-#include <gnome-xml/tree.h>
+#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {