aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-02 16:25:03 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-02 16:25:03 +0800
commit9c73777f2268b5bf2622f893e2a3ba7d0f720572 (patch)
treef81b79f19b87f84b4429d329b3fc0f9ff7946060 /widgets
parent236c15d106b4e740d4e3996e0649334ca8e13876 (diff)
downloadgsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.gz
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.bz2
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.lz
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.xz
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.zst
gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.zip
First big sync of my GNOME 2 porting work (incomplete, and still
pretty broken). Weeeeee! svn path=/trunk/; revision=18503
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ChangeLog15
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c7
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.h3
-rw-r--r--widgets/menus/gal-view-menus.c4
-rw-r--r--widgets/misc/ChangeLog138
-rw-r--r--widgets/misc/Makefile.am2
-rw-r--r--widgets/misc/e-bonobo-widget.c2
-rw-r--r--widgets/misc/e-calendar-item.c58
-rw-r--r--widgets/misc/e-calendar-item.h2
-rw-r--r--widgets/misc/e-calendar.c41
-rw-r--r--widgets/misc/e-cell-date-edit.c9
-rw-r--r--widgets/misc/e-cell-percent.c2
-rw-r--r--widgets/misc/e-cell-percent.h4
-rw-r--r--widgets/misc/e-charset-picker.c13
-rw-r--r--widgets/misc/e-clipped-label.c7
-rw-r--r--widgets/misc/e-combo-button.c30
-rw-r--r--widgets/misc/e-config-page.c6
-rw-r--r--widgets/misc/e-dateedit.c37
-rw-r--r--widgets/misc/e-dateedit.h6
-rw-r--r--widgets/misc/e-dropdown-button.c1
-rw-r--r--widgets/misc/e-filter-bar.c40
-rw-r--r--widgets/misc/e-map.c61
-rw-r--r--widgets/misc/e-map.h1
-rw-r--r--widgets/misc/e-messagebox.c34
-rw-r--r--widgets/misc/e-messagebox.h6
-rw-r--r--widgets/misc/e-search-bar.c14
-rw-r--r--widgets/misc/e-title-bar.c8
-rw-r--r--widgets/misc/e-url-entry.c2
-rw-r--r--widgets/misc/test-calendar.c4
-rw-r--r--widgets/misc/test-dateedit.c6
-rw-r--r--widgets/misc/test-dropdown-button.c7
-rw-r--r--widgets/misc/test-title-bar.c13
32 files changed, 328 insertions, 255 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index d96c40de8e..6a3a93ae75 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,18 @@
+2002-11-01 Ettore Perazzoli <ettore@ximian.com>
+
+ * menus/gal-view-menus.c (build_stuff): Add some casts.
+
+2002-10-30 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-timezone-dialog/e-timezone-dialog.c
+ (e_timezone_dialog_construct): Pass NULL as the domain arg to
+ glade_xml_new().
+ (e_timezone_dialog_get_timezone): Make arg display_name const.
+ (find_selected_point): Constify local variable timezone.
+
+ * e-timezone-dialog/e-timezone-dialog.h: Do not #include
+ <libgnome/gnome-defs.h>.
+
2002-08-15 Mike Kestner <mkestner@ximian.com>
* menus/gal-view-menus.c (build_stuff): ref/unref the gvm
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index 6b99bf4689..fa2b994012 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -246,8 +246,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
/* Load the content widgets */
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-timezone-dialog.glade",
- NULL);
+ priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-timezone-dialog.glade", NULL, NULL);
if (!priv->xml) {
g_message ("e_timezone_dialog_construct(): Could not load the Glade XML file!");
goto error;
@@ -546,7 +545,7 @@ get_zone_from_point (ETimezoneDialog *etd,
It will be in the GTK+ encoding, i.e. not UTF-8. */
char*
e_timezone_dialog_get_timezone (ETimezoneDialog *etd,
- char **display_name)
+ const char **display_name)
{
ETimezoneDialogPrivate *priv;
@@ -612,7 +611,7 @@ find_selected_point (ETimezoneDialog *etd)
{
ETimezoneDialogPrivate *priv;
icalarray *zones;
- char *current_zone;
+ const char *current_zone;
EMapPoint *point = NULL;
int i;
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.h b/widgets/e-timezone-dialog/e-timezone-dialog.h
index 00283b4bc4..f81791bb6f 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.h
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.h
@@ -22,7 +22,6 @@
#ifndef __E_TIMEZONE_DIALOG_H__
#define __E_TIMEZONE_DIALOG_H__
-#include <libgnome/gnome-defs.h>
#include <gtk/gtkwidget.h>
#include <ical.h>
@@ -64,7 +63,7 @@ ETimezoneDialog* e_timezone_dialog_new (void);
so you need to convert it back to English before trying to load it.
It will be in the GTK+ encoding, i.e. not UTF-8. */
char* e_timezone_dialog_get_timezone (ETimezoneDialog *etd,
- char **display_name);
+ const char **display_name);
/* Sets the TZID and displayed name of the timezone. The TZID may be NULL for
a 'local time' (i.e. display_name is NULL or "") or if it is a builtin
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 1595e6f144..dc9f581e0c 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -433,7 +433,7 @@ build_stuff (GalViewMenus *gvm,
{
char *xml;
- gtk_object_ref (gvm);
+ gtk_object_ref (GTK_OBJECT (gvm));
gal_view_menus_unmerge (gvm, ev);
@@ -447,7 +447,7 @@ build_stuff (GalViewMenus *gvm,
set_radio (gvm, ev);
- gtk_object_unref (gvm);
+ gtk_object_unref (GTK_OBJECT (gvm));
}
void
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 94109a5bd9..c8ebe00d0c 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,141 @@
+2002-11-01 Ettore Perazzoli <ettore@ximian.com>
+
+ * test-title-bar.c: #include <libgnomeui/gnome-ui-init.h> instead
+ of <libgnomeui/gnome-init.h>.
+ (main): Use a GtkLabel, not a GtkText.
+
+ * test-dropdown-button.c: #include <libgnomeui/gnome-ui-init.h>
+ instead of <libgnomeui/gnome-init.h>, and
+ <libgnomeui/gnome-stock-icons.h> instead of
+ <libgnomeui/gnome-stock.h>.
+
+ * test-dateedit.c: #include <libgnomeui/gnome-ui-init.h> instead
+ of <libgnomeui/gnome-init.h>.
+ (main): Use gnome_program_init().
+
+ * test-calendar.c: #include <libgnomeui/gnome-ui-init.h>.
+
+ * e-url-entry.c (button_clicked_cb): Pass NULL as the error arg to
+ gnome_url_show().
+
+ * e-title-bar.c (class_init): GTK2-ified. Use GTK_TYPE_POINTER
+ instead of GTK_TYPE_GDK_EVENT.
+
+ * e-search-bar.c: Removed #include <libgnome/gnome-defs.h>.
+ #include <string.h>.
+ (class_init): GTK2-ified.
+ (e_search_bar_set_menu): Use GTK_OBJECT_GET_CLASS.
+ (e_search_bar_set_option): Likewise.
+
+ * e-messagebox.c (e_message_box_class_init): Updated to put
+ finalize in GObjectClass intead of GtkObjectClass.
+ (e_message_box_finalize): Likewise.
+ (e_message_box_construct): Just check if pixmap is NULL, instead
+ of pixmap->pixmap.
+
+ * e-messagebox.h: No {BEGIN,END}_GNOME_DECLS.
+ (e_message_box_get_type): Fix prototype, should return GtkType
+ instead of guint.
+
+ * e-map.c: Removed e_map_signals, which was unused.
+ (e_map_finalize): Update for the fact that finalize is now in
+ GObjectClass.
+ (e_map_class_init): Likewise. Also GTK2-ify.
+ (e_map_draw): Removed.
+ (load_map_background): Pass NULL as the gdk_pixbuf_new_from_file()
+ error arg.
+
+ * e-dropdown-button.c (menu_position_cb): Added arg push_in.
+
+ * e-dateedit.c (e_date_edit_class_init): GTK2-ified.
+ (e_date_edit_show_date_popup): Constify local variable.
+ (e_date_edit_check_date_changed): Likewise.
+ (e_date_edit_check_time_changed): Likewise.
+ (e_date_edit_check_date_changed): Likewise.
+ (field_set_to_none): Constify arg text.
+ (e_date_edit_parse_date): Constify arg date_text.
+ (e_date_edit_parse_time): Constify arg time_text.
+
+ * e-dateedit.h: No {BEGIN,END}_GNOME_DECLS.
+
+ * e-combo-button.c (menu_position_func): New arg push_in.
+ (impl_draw): Removed.
+ (class_init): GTK2-ified.
+ (init): style->xthickness instead of style->klass->xthickness.
+
+ * e-config-page.c (class_init): GTK2-ified.
+
+ * e-clipped-label.c (e_clipped_label_size_request): Use
+ gtk_style_get_font().
+ (e_clipped_label_recalc_chars_displayed): Likewise.
+ (e_clipped_label_expose): Likewise.
+
+ * e-charset-picker.c: No #include <libgnome/gnome-defs.h> or
+ <libgnome/gnome-i18n.h> or <libgnome/gnome-stock.h>. Also no
+ <gal/gunicode.h>. On the other hand, #include <gtk/gtkvbox.h>.
+ (e_charset_picker_new): Make locale_charset const.
+ (e_charset_picker_bonobo_ui_populate): Make locale_charset const.
+
+ * e-cell-percent.c: #include <stdio.h> for sscanf().
+
+ * e-cell-percent.h: Removed BEGIN_GNOME_DECLS, END_GNOME_DECLS.
+
+ * e-cell-percent.c: Do not #include <libgnomeui/gnome-stock.h>.
+
+ * e-cell-date-edit.c: Do not #include <libgnomeui/gnome-stock.h>.
+ Added a bunch of #includes for GTK stuff.
+ (e_cell_date_edit_on_ok_clicked): Constified variable.
+
+ * e-calendar-item.c: Do not #include <libgnome/gnome-defs.h>.
+ (e_calendar_item_class_init): Use GTK_TYPE_POINTER instead of
+ GTK_TYPE_GDK_POINTER.
+ (e_calendar_item_class_init): GTK_CLASS_TYPE() instead of
+ object_class->type.
+ (e_calendar_item_class_init): No gtk_object_class_add_signals().
+ (e_calendar_item_update): style->[xy]thickness instead of
+ style->klass->[xy]thickness.
+ (e_calendar_item_draw): Likewise.
+ (e_calendar_item_draw_month): Likewise.
+ (e_calendar_item_draw_month): Likewise.
+ (e_calendar_item_recalc_sizes): Likewise.
+ (e_calendar_item_convert_position_to_day): Likewise.
+ (e_calendar_item_update): Use gtk_style_get_font().
+ (e_calendar_item_draw_month): Likewise.
+ (e_calendar_item_draw_day_numbers): Likewise.
+ (e_calendar_item_convert_position_to_day): Likewise.
+ (e_calendar_item_recalc_sizes): Likewise.
+ (e_calendar_item_signal_emission_idle_cb): Removed check for
+ GTK_OBJECT_DESTROY.
+ (e_calendar_item_position_menu): Add push_in arg.
+
+ * e-calendar.c (e_calendar_draw): Remove.
+ (e_calendar_size_request): style->[xy]thickness instead of
+ style->klass->[xy]thickness.
+ (e_calendar_size_allocate): Likewise.
+ (e_calendar_get_border_size): Likewise.
+ (e_calendar_size_allocate): Get font from style with
+ gtk_style_get_font().
+
+ * e-calendar-item.h: #include <libgnomecanvas/gnome-canvas.h>
+ instead of <libgnomeui/gnome-canvas.h>.
+ * e-calendar.c: Likewise for
+ <libgnomecanvas/gnome-canvas-widget.h>.
+
+ * Makefile.am: Don't compile e-bonobo-widget.c, e-bonobo-widget.h.
+ [Unused right now, so we can avoid porting until, and if, they are
+ needed.]
+
+ * e-filter-bar.c: Do not #include <libgnome/gnome-defs.h>. Do not
+ #include <libgnomeui/gnome-stock.h>. #include <gtk/gtksignal.h>.
+ Also remove gal #includes.
+ (do_advanced): Add some GTK_SIGNAL_FUNC() casts.
+ (menubar_activated): Likewise.
+ (menubar_activated): Likewise.
+
+2002-10-30 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-map.h: Do not #include <libgnome/gnome-defs.h>.
+
2002-10-28 Jeffrey Stedfast <fejj@ximian.com>
* e-search-bar.c (clear_search): Emit a search_activated signal.
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index 3e71f36498..7e02313f13 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -15,7 +15,6 @@ privlib_LIBRARIES = \
widgetsincludedir = $(includedir)/evolution/widgets
widgetsinclude_HEADERS = \
- e-bonobo-widget.h \
e-calendar.h \
e-calendar-item.h \
e-cell-date-edit.h \
@@ -35,7 +34,6 @@ widgetsinclude_HEADERS = \
libemiscwidgets_a_SOURCES = \
$(widgetsinclude_HEADERS) \
- e-bonobo-widget.c \
e-calendar.c \
e-calendar-item.c \
e-cell-date-edit.c \
diff --git a/widgets/misc/e-bonobo-widget.c b/widgets/misc/e-bonobo-widget.c
index 491c0ed7cb..7302356860 100644
--- a/widgets/misc/e-bonobo-widget.c
+++ b/widgets/misc/e-bonobo-widget.c
@@ -28,7 +28,7 @@
#include "e-bonobo-widget.h"
-#include <gal/util/e-util.h>
+#include <bonobo/bonobo-control.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkx.h>
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 4a53b10e96..6a7e4494d2 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -37,7 +37,6 @@
#include <gtk/gtkmenuitem.h>
#include <gtk/gtklabel.h>
#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
@@ -214,6 +213,7 @@ static void e_calendar_item_on_menu_item_activate(GtkWidget *menuitem,
static void e_calendar_item_position_menu (GtkMenu *menu,
gint *x,
gint *y,
+ gboolean *push_in,
gpointer user_data);
static void e_calendar_item_date_range_changed (ECalendarItem *calitem);
static void e_calendar_item_queue_signal_emission (ECalendarItem *calitem);
@@ -291,10 +291,10 @@ e_calendar_item_class_init (ECalendarItemClass *class)
GTK_TYPE_DOUBLE, GTK_ARG_READWRITE,
ARG_Y2);
gtk_object_add_arg_type ("ECalendarItem::font",
- GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE,
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE,
ARG_FONT);
gtk_object_add_arg_type ("ECalendarItem::week_number_font",
- GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE,
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE,
ARG_WEEK_NUMBER_FONT);
gtk_object_add_arg_type ("ECalendarItem::row_height",
GTK_TYPE_INT, GTK_ARG_READABLE,
@@ -339,22 +339,18 @@ e_calendar_item_class_init (ECalendarItemClass *class)
e_calendar_item_signals[DATE_RANGE_CHANGED] =
gtk_signal_new ("date_range_changed",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ECalendarItemClass, date_range_changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
e_calendar_item_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ECalendarItemClass, selection_changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, e_calendar_item_signals,
- LAST_SIGNAL);
-
-
object_class->destroy = e_calendar_item_destroy;
object_class->get_arg = e_calendar_item_get_arg;
object_class->set_arg = e_calendar_item_set_arg;
@@ -737,8 +733,11 @@ e_calendar_item_unrealize (GnomeCanvasItem *item)
colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas));
- for (i = 0; i < E_CALENDAR_ITEM_COLOR_LAST; i++)
- gdk_colors_free (colormap, &calitem->colors[i].pixel, 1, 0);
+ for (i = 0; i < E_CALENDAR_ITEM_COLOR_LAST; i++) {
+ /* FIXME: gdk_colors_free expects gulong* here but the pixel value in GdkColor
+ is guint32. GDK bug? */
+ gdk_colors_free (colormap, (gulong *) &calitem->colors[i].pixel, 1, 0);
+ }
if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
(* GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize) (item);
@@ -779,8 +778,8 @@ e_calendar_item_update (GnomeCanvasItem *item,
calitem = E_CALENDAR_ITEM (item);
style = GTK_WIDGET (item->canvas)->style;
- xthickness = style->klass->xthickness;
- ythickness = style->klass->ythickness;
+ xthickness = style->xthickness;
+ ythickness = style->ythickness;
item->x1 = calitem->x1;
item->y1 = calitem->y1;
@@ -831,7 +830,7 @@ e_calendar_item_update (GnomeCanvasItem *item,
font = calitem->font;
if (!font)
- font = style->font;
+ font = gtk_style_get_font (style);
char_height = font->ascent + font->descent;
calitem->month_width = calitem->min_month_width;
@@ -911,10 +910,10 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
style = GTK_WIDGET (canvas_item->canvas)->style;
font = calitem->font;
if (!font)
- font = style->font;
+ font = gtk_style_get_font (style);
char_height = font->ascent + font->descent;
- xthickness = style->klass->xthickness;
- ythickness = style->klass->ythickness;
+ xthickness = style->xthickness;
+ ythickness = style->ythickness;
base_gc = style->base_gc[GTK_STATE_NORMAL];
bg_gc = style->bg_gc[GTK_STATE_NORMAL];
@@ -1010,10 +1009,10 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
style = widget->style;
font = calitem->font;
if (!font)
- font = style->font;
+ font = gtk_style_get_font (style);
char_height = font->ascent + font->descent;
- xthickness = style->klass->xthickness;
- ythickness = style->klass->ythickness;
+ xthickness = style->xthickness;
+ ythickness = style->ythickness;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
/* Calculate the top-left position of the entire month display. */
@@ -1047,7 +1046,7 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
else
max_x -= E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME;
- text_y = month_y + style->klass->ythickness
+ text_y = month_y + style->ythickness
+ E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME;
clip_rect.x = month_x + min_x;
clip_rect.x = MAX (0, clip_rect.x);
@@ -1190,7 +1189,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
style = widget->style;
font = calitem->font;
if (!font)
- font = style->font;
+ font = gtk_style_get_font (style);
wkfont = calitem->week_number_font;
if (!wkfont)
wkfont = font;
@@ -1530,7 +1529,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem)
font = calitem->font;
if (!font)
- font = style->font;
+ font = gtk_style_get_font (style);
wkfont = calitem->week_number_font;
if (!wkfont)
wkfont = font;
@@ -1588,7 +1587,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem)
+ E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS + 1;
}
- calitem->min_month_height = style->klass->ythickness * 2
+ calitem->min_month_height = style->ythickness * 2
+ E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME + char_height
+ E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME + 1
+ E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS
@@ -1967,9 +1966,9 @@ e_calendar_item_convert_position_to_day (ECalendarItem *calitem,
item = GNOME_CANVAS_ITEM (calitem);
widget = GTK_WIDGET (item->canvas);
style = widget->style;
- char_height = style->font->ascent + style->font->descent;
- xthickness = style->klass->xthickness;
- ythickness = style->klass->ythickness;
+ char_height = gtk_style_get_font (style)->ascent + gtk_style_get_font (style)->descent;
+ xthickness = style->xthickness;
+ ythickness = style->ythickness;
*entire_week = FALSE;
@@ -2848,6 +2847,7 @@ static void
e_calendar_item_position_menu (GtkMenu *menu,
gint *x,
gint *y,
+ gboolean *push_in,
gpointer user_data)
{
GtkRequisition requisition;
@@ -2926,9 +2926,7 @@ e_calendar_item_signal_emission_idle_cb (gpointer data)
e_calendar_item_signals[DATE_RANGE_CHANGED]);
}
- if (GTK_OBJECT_DESTROYED (calitem)) {
- g_warning ("e_calendar_item_signal_emission_idle_cb: item destroyed");
- } else if (calitem->selection_changed) {
+ if (calitem->selection_changed) {
calitem->selection_changed = FALSE;
gtk_signal_emit (GTK_OBJECT (calitem),
e_calendar_item_signals[SELECTION_CHANGED]);
diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h
index b5aab144ef..e153d7a052 100644
--- a/widgets/misc/e-calendar-item.h
+++ b/widgets/misc/e-calendar-item.h
@@ -23,7 +23,7 @@
#ifndef _E_CALENDAR_ITEM_H_
#define _E_CALENDAR_ITEM_H_
-#include <libgnomeui/gnome-canvas.h>
+#include <libgnomecanvas/gnome-canvas.h>
#ifdef __cplusplus
extern "C" {
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index 94dd4a61bc..49dc391686 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -38,7 +38,7 @@
#include <gtk/gtkmain.h>
#include <gtk/gtkpixmap.h>
#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas-widget.h>
+#include <libgnomecanvas/gnome-canvas-widget.h>
#include <gal/util/e-util.h>
#define E_CALENDAR_SMALL_FONT \
@@ -104,8 +104,6 @@ static void e_calendar_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void e_calendar_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void e_calendar_draw (GtkWidget *widget,
- GdkRectangle *area);
static gint e_calendar_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
@@ -150,7 +148,6 @@ e_calendar_class_init (ECalendarClass *class)
widget_class->style_set = e_calendar_style_set;
widget_class->size_request = e_calendar_size_request;
widget_class->size_allocate = e_calendar_size_allocate;
- widget_class->draw = e_calendar_draw;
widget_class->drag_motion = e_calendar_drag_motion;
widget_class->drag_leave = e_calendar_drag_leave;
}
@@ -331,8 +328,8 @@ e_calendar_size_request (GtkWidget *widget,
height = row_height * cal->min_rows;
width = col_width * cal->min_cols;
- requisition->width = width + style->klass->xthickness * 2;
- requisition->height = height + style->klass->ythickness * 2;
+ requisition->width = width + style->xthickness * 2;
+ requisition->height = height + style->ythickness * 2;
}
@@ -346,9 +343,9 @@ e_calendar_size_allocate (GtkWidget *widget,
gdouble xthickness, ythickness, arrow_button_size;
cal = E_CALENDAR (widget);
- font = widget->style->font;
- xthickness = widget->style->klass->xthickness;
- ythickness = widget->style->klass->ythickness;
+ font = gtk_style_get_font (widget->style);
+ xthickness = widget->style->xthickness;
+ ythickness = widget->style->ythickness;
(*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
@@ -396,24 +393,6 @@ e_calendar_size_allocate (GtkWidget *widget,
NULL);
}
-
-static void
-e_calendar_draw (GtkWidget *widget,
- GdkRectangle *area)
-{
- ECalendar *cal;
-
- cal = E_CALENDAR (widget);
-
- (*GTK_WIDGET_CLASS (parent_class)->draw) (widget, area);
-
- /* GnomeCanvas bug workaround to draw the GnomeCanvasWidgets. */
-#if 0
- (*GTK_WIDGET_CLASS (grandparent_class)->draw) (widget, area);
-#endif
-}
-
-
void
e_calendar_set_minimum_size (ECalendar *cal,
gint rows,
@@ -467,10 +446,10 @@ e_calendar_get_border_size (ECalendar *cal,
style = GTK_WIDGET (cal)->style;
if (style) {
- *top = style->klass->ythickness;
- *bottom = style->klass->ythickness;
- *left = style->klass->xthickness;
- *right = style->klass->xthickness;
+ *top = style->ythickness;
+ *bottom = style->ythickness;
+ *left = style->xthickness;
+ *right = style->xthickness;
} else {
*top = *bottom = *left = *right = 0;
}
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index 4d775617ea..b2a022a351 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -33,13 +33,17 @@
#include <string.h>
#include <time.h>
#include <glib.h>
+
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
#include <gal/util/e-util.h>
#include <gal/e-table/e-table-item.h>
#include <gal/e-table/e-cell-text.h>
+
#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
#include <libgnome/gnome-i18n.h>
+
#include "e-util/e-time-utils.h"
/* This depends on ECalendar which is why I didn't put it in gal. */
#include "e-calendar.h"
@@ -740,7 +744,8 @@ e_cell_date_edit_on_ok_clicked (GtkWidget *button,
GDate start_date, end_date;
gboolean day_selected;
struct tm date_tm;
- char buffer[64], *text;
+ char buffer[64];
+ const char *text;
ETimeParseStatus status;
gboolean is_date = FALSE;
diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c
index 8fdd124e11..c267f7b223 100644
--- a/widgets/misc/e-cell-percent.c
+++ b/widgets/misc/e-cell-percent.c
@@ -32,9 +32,9 @@
#include <sys/time.h>
#include <unistd.h>
+#include <stdio.h>
#include <gal/util/e-util.h>
#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
#include <libgnome/gnome-i18n.h>
#include "e-cell-percent.h"
diff --git a/widgets/misc/e-cell-percent.h b/widgets/misc/e-cell-percent.h
index 0fea27c9e6..3fdfb994df 100644
--- a/widgets/misc/e-cell-percent.h
+++ b/widgets/misc/e-cell-percent.h
@@ -31,8 +31,6 @@
#include <gal/e-table/e-cell-text.h>
-BEGIN_GNOME_DECLS
-
#define E_CELL_PERCENT_TYPE (e_cell_percent_get_type ())
#define E_CELL_PERCENT(o) (GTK_CHECK_CAST ((o), E_CELL_PERCENT_TYPE, ECellPercent))
#define E_CELL_PERCENT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CELL_PERCENT_TYPE, ECellPercentClass))
@@ -50,6 +48,4 @@ typedef struct {
GtkType e_cell_percent_get_type (void);
ECell *e_cell_percent_new (const char *fontname, GtkJustification justify);
-END_GNOME_DECLS
-
#endif /* _E_CELL_PERCENT_H_ */
diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c
index 5c8751149e..f2ffb3a5ef 100644
--- a/widgets/misc/e-charset-picker.c
+++ b/widgets/misc/e-charset-picker.c
@@ -24,18 +24,18 @@
#include "e-charset-picker.h"
#include <gal/widgets/e-gui-utils.h>
-#include <gal/unicode/gunicode.h>
#include <iconv.h>
+#include <gtk/gtkvbox.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
+
#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-stock.h>
+#include <libgnome/gnome-i18n.h>
+
#include <bonobo/bonobo-ui-node.h>
#include <bonobo/bonobo-ui-util.h>
@@ -240,7 +240,7 @@ e_charset_picker_new (const char *default_charset)
{
GtkWidget *menu, *item;
int def, i;
- char *locale_charset;
+ const char *locale_charset;
g_get_charset (&locale_charset);
if (!g_strcasecmp (locale_charset, "US-ASCII"))
@@ -382,7 +382,8 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
const char *default_charset,
BonoboUIListenerFn cb, gpointer user_data)
{
- char *locale_charset, *encoded_label, *label;
+ char *encoded_label, *label;
+ const char *locale_charset;
GString *menuitems;
int def, i;
diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c
index 6da313940c..adefe64048 100644
--- a/widgets/misc/e-clipped-label.c
+++ b/widgets/misc/e-clipped-label.c
@@ -40,7 +40,6 @@
#include <glib.h>
#include <gdk/gdki18n.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
@@ -156,7 +155,7 @@ e_clipped_label_size_request (GtkWidget *widget,
g_return_if_fail (requisition != NULL);
label = E_CLIPPED_LABEL (widget);
- font = widget->style->font;
+ font = gtk_style_get_font (widget->style);
requisition->width = 0;
requisition->height = font->ascent + font->descent
@@ -194,7 +193,7 @@ e_clipped_label_expose (GtkWidget *widget,
label = E_CLIPPED_LABEL (widget);
misc = GTK_MISC (widget);
- font = widget->style->font;
+ font = gtk_style_get_font (widget->style);
/* If the label isn't visible or has no text, just return. */
if (!GTK_WIDGET_VISIBLE (widget) || !GTK_WIDGET_MAPPED (widget)
@@ -339,7 +338,7 @@ e_clipped_label_recalc_chars_displayed (EClippedLabel *label)
GdkFont *font;
gint max_width, width, ch, last_width;
- font = GTK_WIDGET (label)->style->font;
+ font = gtk_style_get_font (GTK_WIDGET (label)->style);
max_width = GTK_WIDGET (label)->allocation.width
- 2 * GTK_MISC (label)->xpad;
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 9203bece01..d0def44baa 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -246,6 +246,7 @@ static void
menu_position_func (GtkMenu *menu,
gint *x_return,
gint *y_return,
+ gboolean *push_in,
void *data)
{
EComboButton *combo_button;
@@ -343,26 +344,6 @@ impl_leave_notify_event (GtkWidget *widget,
return FALSE;
}
-static void
-impl_draw (GtkWidget *widget,
- GdkRectangle *area)
-{
- GdkRectangle child_area;
- GdkRectangle tmp_area;
-
- if (! GTK_WIDGET_DRAWABLE (widget))
- return;
-
- tmp_area = *area;
- tmp_area.x -= GTK_CONTAINER (widget)->border_width;
- tmp_area.y -= GTK_CONTAINER (widget)->border_width;
-
- paint (E_COMBO_BUTTON (widget), &tmp_area);
-
- if (GTK_BIN (widget)->child && gtk_widget_intersect (GTK_BIN (widget)->child, &tmp_area, &child_area))
- gtk_widget_draw (GTK_BIN (widget)->child, &child_area);
-}
-
static int
impl_expose_event (GtkWidget *widget,
GdkEventExpose *event)
@@ -439,7 +420,6 @@ class_init (GtkObjectClass *object_class)
widget_class = GTK_WIDGET_CLASS (object_class);
widget_class->button_press_event = impl_button_press_event;
widget_class->leave_notify_event = impl_leave_notify_event;
- widget_class->draw = impl_draw;
widget_class->expose_event = impl_expose_event;
button_class = GTK_BUTTON_CLASS (object_class);
@@ -447,12 +427,10 @@ class_init (GtkObjectClass *object_class)
signals[ACTIVATE_DEFAULT] = gtk_signal_new ("activate_default",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (EComboButtonClass, activate_default),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}
static void
@@ -473,12 +451,12 @@ init (EComboButton *combo_button)
priv->label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->label, TRUE, TRUE,
- 2 * GTK_WIDGET (combo_button)->style->klass->xthickness);
+ 2 * GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->label);
priv->arrow_pixmap = create_arrow_pixmap_widget ();
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->arrow_pixmap, TRUE, TRUE,
- GTK_WIDGET (combo_button)->style->klass->xthickness);
+ GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->arrow_pixmap);
priv->icon = NULL;
diff --git a/widgets/misc/e-config-page.c b/widgets/misc/e-config-page.c
index 7006dc7a11..d6f74a0d14 100644
--- a/widgets/misc/e-config-page.c
+++ b/widgets/misc/e-config-page.c
@@ -74,19 +74,17 @@ class_init (EConfigPageClass *class)
signals[APPLY] = gtk_signal_new ("apply",
GTK_RUN_LAST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (EConfigPageClass, apply),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
signals[CHANGED] = gtk_signal_new ("changed",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (EConfigPageClass, changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}
static void
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 5a99e3e8fc..7983aea5fd 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -54,7 +54,6 @@
#include <gtk/gtkmain.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkvbox.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include "e-util/e-time-utils.h"
#include "e-calendar.h"
@@ -168,12 +167,12 @@ static void on_date_popup_date_selected (ECalendarItem *calitem,
EDateEdit *dedit);
static void hide_date_popup (EDateEdit *dedit);
static void rebuild_time_popup (EDateEdit *dedit);
-static gboolean field_set_to_none (char *text);
+static gboolean field_set_to_none (const char *text);
static gboolean e_date_edit_parse_date (EDateEdit *dedit,
- char *date_text,
+ const char *date_text,
struct tm *date_tm);
static gboolean e_date_edit_parse_time (EDateEdit *dedit,
- gchar *time_text,
+ const gchar *time_text,
struct tm *time_tm);
static void on_date_edit_time_selected (GtkList *list,
EDateEdit *dedit);
@@ -247,20 +246,17 @@ e_date_edit_class_init (EDateEditClass *class)
date_edit_signals [CHANGED] =
gtk_signal_new ("changed",
- GTK_RUN_FIRST, object_class->type,
- GTK_SIGNAL_OFFSET (EDateEditClass,
- changed),
+ GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (EDateEditClass, changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
- gtk_object_class_add_signals (object_class, date_edit_signals,
- LAST_SIGNAL);
- object_class->destroy = e_date_edit_destroy;
+ object_class->destroy = e_date_edit_destroy;
- widget_class->grab_focus = e_date_edit_grab_focus;
+ widget_class->grab_focus = e_date_edit_grab_focus;
- container_class->forall = e_date_edit_forall;
+ container_class->forall = e_date_edit_forall;
class->changed = NULL;
}
@@ -1167,7 +1163,7 @@ e_date_edit_show_date_popup (EDateEdit *dedit)
EDateEditPrivate *priv;
ECalendar *calendar;
struct tm mtm;
- gchar *date_text;
+ const gchar *date_text;
GDate selected_day;
gboolean clear_selection = FALSE;
@@ -1431,7 +1427,7 @@ rebuild_time_popup (EDateEdit *dedit)
static gboolean
e_date_edit_parse_date (EDateEdit *dedit,
- gchar *date_text,
+ const gchar *date_text,
struct tm *date_tm)
{
if (e_time_parse_date (date_text, date_tm) != E_TIME_PARSE_OK)
@@ -1443,7 +1439,7 @@ e_date_edit_parse_date (EDateEdit *dedit,
static gboolean
e_date_edit_parse_time (EDateEdit *dedit,
- gchar *time_text,
+ const gchar *time_text,
struct tm *time_tm)
{
if (field_set_to_none (time_text)) {
@@ -1462,9 +1458,10 @@ e_date_edit_parse_time (EDateEdit *dedit,
/* Returns TRUE if the string is empty or is "None" in the current locale.
It ignores whitespace. */
static gboolean
-field_set_to_none (char *text)
+field_set_to_none (const char *text)
{
- char *pos, *none_string;
+ const char *pos;
+ const char *none_string;
pos = text;
while (isspace (*pos))
@@ -1644,7 +1641,7 @@ e_date_edit_update_time_combo_state (EDateEdit *dedit)
EDateEditPrivate *priv;
gboolean show = TRUE, show_now_button = TRUE;
gboolean clear_entry = FALSE, sensitive = TRUE;
- gchar *text;
+ const gchar *text;
priv = dedit->priv;
@@ -1699,7 +1696,7 @@ static void
e_date_edit_check_date_changed (EDateEdit *dedit)
{
EDateEditPrivate *priv;
- gchar *date_text;
+ const gchar *date_text;
struct tm tmp_tm;
gboolean none = FALSE, valid = TRUE, date_changed = FALSE;
@@ -1737,7 +1734,7 @@ static void
e_date_edit_check_time_changed (EDateEdit *dedit)
{
EDateEditPrivate *priv;
- gchar *time_text;
+ const gchar *time_text;
struct tm tmp_tm;
gboolean none = FALSE, valid = TRUE, time_changed;
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index 8e307c5d45..dca79d3df1 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -44,11 +44,7 @@
#include <glib.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-BEGIN_GNOME_DECLS
-
-
#define E_TYPE_DATE_EDIT (e_date_edit_get_type ())
#define E_DATE_EDIT(obj) (GTK_CHECK_CAST ((obj), E_TYPE_DATE_EDIT, EDateEdit))
#define E_DATE_EDIT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_EDIT, EDateEditClass))
@@ -179,6 +175,4 @@ void e_date_edit_set_get_time_callback (EDateEdit *dedit,
gpointer data,
GtkDestroyNotify destroy);
-END_GNOME_DECLS
-
#endif
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index fbd5f76c78..7a25b80859 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -52,6 +52,7 @@ static void
menu_position_cb (GtkMenu *menu,
int *x,
int *y,
+ gboolean *push_in,
void *data)
{
EDropdownButton *dropdown_button;
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 649f6b7d1e..5460d39ffd 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -25,17 +25,13 @@
#include <config.h>
#include <glib.h>
-#include <libgnome/gnome-defs.h>
+#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
#include "e-dropdown-button.h"
#include "e-filter-bar.h"
#include "filter/rule-editor.h"
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-gui-utils.h>
-
#define d(x)
enum {
@@ -164,8 +160,8 @@ do_advanced (ESearchBar *esb)
gtk_widget_show (gd);
gtk_object_ref (GTK_OBJECT (rule));
gtk_object_set_data_full (GTK_OBJECT (gd), "rule", rule, (GtkDestroyNotify)gtk_object_unref);
- gtk_signal_connect (GTK_OBJECT (gd), "clicked", rule_advanced_clicked, efb);
- gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "clicked", GTK_SIGNAL_FUNC (rule_advanced_clicked), efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "destroy", GTK_SIGNAL_FUNC (rule_editor_destroyed), efb);
e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE);
gtk_widget_set_sensitive (esb->entry, FALSE);
@@ -187,8 +183,10 @@ menubar_activated (ESearchBar *esb, int id, void *data)
gd = (GnomeDialog *) rule_editor_new (efb->context, FILTER_SOURCE_INCOMING);
efb->save_dialogue = (GtkWidget *) gd;
gtk_window_set_title (GTK_WINDOW (gd), _("Search Editor"));
- gtk_signal_connect (GTK_OBJECT (gd), "clicked", full_rule_editor_clicked, efb);
- gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "clicked",
+ GTK_SIGNAL_FUNC (full_rule_editor_clicked), efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "destroy",
+ GTK_SIGNAL_FUNC (rule_editor_destroyed), efb);
gtk_widget_show (GTK_WIDGET (gd));
}
break;
@@ -219,8 +217,8 @@ menubar_activated (ESearchBar *esb, int id, void *data)
gtk_widget_show (gd);
gtk_object_ref (GTK_OBJECT (rule));
gtk_object_set_data_full (GTK_OBJECT (gd), "rule", rule, (GtkDestroyNotify)gtk_object_unref);
- gtk_signal_connect (GTK_OBJECT (gd), "clicked", rule_editor_clicked, efb);
- gtk_signal_connect (GTK_OBJECT (gd), "destroy", rule_editor_destroyed, efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "clicked", GTK_SIGNAL_FUNC (rule_editor_clicked), efb);
+ gtk_signal_connect (GTK_OBJECT (gd), "destroy", GTK_SIGNAL_FUNC (rule_editor_destroyed), efb);
e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE);
gtk_widget_set_sensitive (esb->entry, FALSE);
@@ -359,7 +357,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
if (g_slist_find(gtksux, rule) == NULL) {
gtk_object_ref((GtkObject *)rule);
- gtk_signal_connect((GtkObject *)rule, "changed", rule_changed, efb);
+ gtk_signal_connect((GtkObject *)rule, "changed", GTK_SIGNAL_FUNC (rule_changed), efb);
} else {
gtksux = g_slist_remove(gtksux, rule);
}
@@ -373,7 +371,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
next = gtksux->next;
rule = gtksux->data;
- gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, efb);
+ gtk_signal_disconnect_by_func((GtkObject *)rule, GTK_SIGNAL_FUNC (rule_changed), efb);
gtk_object_unref((GtkObject *)rule);
g_slist_free_1(gtksux);
@@ -561,7 +559,7 @@ static void clear_rules(EFilterBar *efb, GPtrArray *rules)
/* clear out any data on old rules */
for (i=0;i<rules->len;i++) {
rule = rules->pdata[i];
- gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, efb);
+ gtk_signal_disconnect_by_func((GtkObject *)rule, GTK_SIGNAL_FUNC (rule_changed), efb);
gtk_object_unref((GtkObject *)rule);
}
g_ptr_array_set_size (rules, 0);
@@ -577,8 +575,8 @@ destroy (GtkObject *object)
bar = E_FILTER_BAR (object);
- gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), context_changed, bar);
- gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), context_rule_removed, bar);
+ gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), GTK_SIGNAL_FUNC (context_changed), bar);
+ gtk_signal_disconnect_by_func(GTK_OBJECT (bar->context), GTK_SIGNAL_FUNC (context_rule_removed), bar);
clear_rules(bar, bar->menu_rules);
clear_rules(bar, bar->option_rules);
@@ -640,9 +638,9 @@ class_init (EFilterBarClass *klass)
static void
init (EFilterBar *efb)
{
- gtk_signal_connect (GTK_OBJECT (efb), "menu_activated", menubar_activated, NULL);
- gtk_signal_connect (GTK_OBJECT (efb), "query_changed", option_changed, NULL);
- gtk_signal_connect (GTK_OBJECT (efb), "search_activated", option_changed, NULL);
+ gtk_signal_connect (GTK_OBJECT (efb), "menu_activated", GTK_SIGNAL_FUNC (menubar_activated), NULL);
+ gtk_signal_connect (GTK_OBJECT (efb), "query_changed", GTK_SIGNAL_FUNC (option_changed), NULL);
+ gtk_signal_connect (GTK_OBJECT (efb), "search_activated", GTK_SIGNAL_FUNC (option_changed), NULL);
efb->menu_rules = g_ptr_array_new ();
efb->option_rules = g_ptr_array_new ();
@@ -674,8 +672,8 @@ e_filter_bar_new (RuleContext *context,
e_search_bar_construct ((ESearchBar *)bar, &item, &item);
- gtk_signal_connect (GTK_OBJECT (context), "changed", context_changed, bar);
- gtk_signal_connect (GTK_OBJECT (context), "rule_removed", context_rule_removed, bar);
+ gtk_signal_connect (GTK_OBJECT (context), "changed", GTK_SIGNAL_FUNC (context_changed), bar);
+ gtk_signal_connect (GTK_OBJECT (context), "rule_removed", GTK_SIGNAL_FUNC (context_rule_removed), bar);
return bar;
}
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index de9d96d009..8114bead81 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -80,28 +80,17 @@ typedef struct
EMapPrivate;
-/* Signal IDs */
-
-enum
-{
- LAST_SIGNAL
-};
-
-static guint e_map_signals[LAST_SIGNAL];
-
-
/* Internal prototypes */
static void e_map_class_init (EMapClass *class);
static void e_map_init (EMap *view);
+static void e_map_finalize (GObject *object);
static void e_map_destroy (GtkObject *object);
-static void e_map_finalize (GtkObject *object);
static void e_map_unmap (GtkWidget *widget);
static void e_map_realize (GtkWidget *widget);
static void e_map_unrealize (GtkWidget *widget);
static void e_map_size_request (GtkWidget *widget, GtkRequisition *requisition);
static void e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
-static void e_map_draw (GtkWidget *widget, GdkRectangle *area);
static gint e_map_button_press (GtkWidget *widget, GdkEventButton *event);
static gint e_map_button_release (GtkWidget *widget, GdkEventButton *event);
static gint e_map_motion (GtkWidget *widget, GdkEventMotion *event);
@@ -170,28 +159,35 @@ e_map_get_type (void)
static void
e_map_class_init (EMapClass *class)
{
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
+ gobject_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+ gobject_class->finalize = e_map_finalize;
+
object_class->destroy = e_map_destroy;
- object_class->finalize = e_map_finalize;
class->set_scroll_adjustments = e_map_set_scroll_adjustments;
- widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, object_class->type, GTK_SIGNAL_OFFSET (EMapClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
-
- gtk_object_class_add_signals (object_class, e_map_signals, LAST_SIGNAL);
+ widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments",
+ GTK_RUN_LAST,
+ GTK_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (EMapClass, set_scroll_adjustments),
+ gtk_marshal_NONE__POINTER_POINTER,
+ GTK_TYPE_NONE, 2,
+ GTK_TYPE_ADJUSTMENT,
+ GTK_TYPE_ADJUSTMENT);
widget_class->unmap = e_map_unmap;
widget_class->realize = e_map_realize;
widget_class->unrealize = e_map_unrealize;
widget_class->size_request = e_map_size_request;
widget_class->size_allocate = e_map_size_allocate;
- widget_class->draw = e_map_draw;
widget_class->button_press_event = e_map_button_press;
widget_class->button_release_event = e_map_button_release;
widget_class->motion_notify_event = e_map_motion;
@@ -246,7 +242,7 @@ e_map_destroy (GtkObject *object)
/* Finalize handler for the map view */
static void
-e_map_finalize (GtkObject *object)
+e_map_finalize (GObject *object)
{
EMap *view;
EMapPrivate *priv;
@@ -278,8 +274,8 @@ e_map_finalize (GtkObject *object)
g_free (priv);
view->priv = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (*GTK_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@ -407,23 +403,6 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
}
-/* Draw handler for the map view */
-
-static void
-e_map_draw (GtkWidget *widget, GdkRectangle *area)
-{
- EMap *view;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (IS_E_MAP (widget));
- g_return_if_fail (area != NULL);
-
- view = E_MAP (widget);
-
- request_paint_area (view, area);
-}
-
-
/* Button press handler for the map view */
static gint
@@ -991,15 +970,15 @@ load_map_background (EMap *view, gchar *name)
priv = view->priv;
- pb0 = gdk_pixbuf_new_from_file (name);
-/* pb0 = tool_load_image (name);*/
- if (!pb0) return (FALSE);
+ pb0 = gdk_pixbuf_new_from_file (name, NULL);
+ if (!pb0)
+ return FALSE;
if (priv->map_pixbuf) gdk_pixbuf_unref (priv->map_pixbuf);
priv->map_pixbuf = pb0;
update_render_pixbuf (view, GDK_INTERP_BILINEAR, TRUE);
- return (TRUE);
+ return TRUE;
}
diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h
index 1a2bb3ba1b..bf4deb2ca1 100644
--- a/widgets/misc/e-map.h
+++ b/widgets/misc/e-map.h
@@ -23,7 +23,6 @@
#ifndef E_MAP_H
#define E_MAP_H
-#include <libgnome/gnome-defs.h>
#include <gtk/gtkwidget.h>
#define TYPE_E_MAP (e_map_get_type ())
diff --git a/widgets/misc/e-messagebox.c b/widgets/misc/e-messagebox.c
index 711ea8d174..9607e2fa92 100644
--- a/widgets/misc/e-messagebox.c
+++ b/widgets/misc/e-messagebox.c
@@ -29,7 +29,6 @@
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-triggers.h>
#include <libgnome/gnome-util.h>
@@ -47,8 +46,8 @@ struct _EMessageBoxPrivate {
static void e_message_box_class_init (EMessageBoxClass *klass);
static void e_message_box_init (EMessageBox *messagebox);
+static void e_message_box_finalize (GObject *object);
static void e_message_box_destroy (GtkObject *object);
-static void e_message_box_finalize (GtkObject *object);
static GnomeDialogClass *parent_class;
@@ -77,13 +76,16 @@ e_message_box_get_type (void)
static void
e_message_box_class_init (EMessageBoxClass *klass)
{
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
- object_class = (GtkObjectClass *)klass;
+ gobject_class = (GObjectClass *) klass;
+ object_class = (GtkObjectClass *) klass;
parent_class = gtk_type_class (gnome_dialog_get_type ());
+ gobject_class->finalize = e_message_box_finalize;
+
object_class->destroy = e_message_box_destroy;
- object_class->finalize = e_message_box_finalize;
}
static void
@@ -93,23 +95,23 @@ e_message_box_init (EMessageBox *message_box)
}
static void
-e_message_box_destroy (GtkObject *object)
-{
- /* remember, destroy can be run multiple times! */
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-e_message_box_finalize (GtkObject *object)
+e_message_box_finalize (GObject *object)
{
EMessageBox *mbox = E_MESSAGE_BOX (object);
g_free (mbox->_priv);
mbox->_priv = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+static void
+e_message_box_destroy (GtkObject *object)
+{
+ /* remember, destroy can be run multiple times! */
+ if (GTK_OBJECT_CLASS (parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
/**
@@ -189,7 +191,7 @@ e_message_box_construct (EMessageBox *messagebox,
hbox, TRUE, TRUE, 10);
gtk_widget_show (hbox);
- if ((pixmap == NULL) || (GNOME_PIXMAP (pixmap)->pixmap == NULL)) {
+ if (pixmap == NULL) {
if (pixmap)
gtk_widget_destroy (pixmap);
s = gnome_unconditional_pixmap_file ("gnome-default.png");
diff --git a/widgets/misc/e-messagebox.h b/widgets/misc/e-messagebox.h
index 7c7a2e613f..c7f280bbf2 100644
--- a/widgets/misc/e-messagebox.h
+++ b/widgets/misc/e-messagebox.h
@@ -27,8 +27,6 @@
#include <gtk/gtkwidget.h>
#include <libgnomeui/gnome-dialog.h>
-BEGIN_GNOME_DECLS
-
#define E_TYPE_MESSAGE_BOX (e_message_box_get_type ())
#define E_MESSAGE_BOX(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MESSAGE_BOX, EMessageBox))
#define E_MESSAGE_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MESSAGE_BOX, EMessageBoxClass))
@@ -62,7 +60,7 @@ struct _EMessageBoxClass
};
-guint e_message_box_get_type (void) G_GNUC_CONST;
+GtkType e_message_box_get_type (void) G_GNUC_CONST;
GtkWidget* e_message_box_new (const gchar *message,
const gchar *messagebox_type,
...);
@@ -80,6 +78,4 @@ GtkWidget *e_message_box_get_label (EMessageBox *messagebox);
GtkWidget *e_message_box_get_checkbox (EMessageBox *messagebox);
-END_GNOME_DECLS
-
#endif /* __E_MESSAGE_BOX_H__ */
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index da3bcb0803..a1cc110243 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -36,12 +36,12 @@
#include <gal/widgets/e-unicode.h>
#include <gal/widgets/e-gui-utils.h>
-#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <bonobo/bonobo-ui-util.h>
#include <stdlib.h>
+#include <string.h>
#include "e-search-bar.h"
@@ -823,7 +823,7 @@ class_init (ESearchBarClass *klass)
esb_signals [QUERY_CHANGED] =
gtk_signal_new ("query_changed",
GTK_RUN_LAST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ESearchBarClass, query_changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
@@ -831,7 +831,7 @@ class_init (ESearchBarClass *klass)
esb_signals [MENU_ACTIVATED] =
gtk_signal_new ("menu_activated",
GTK_RUN_LAST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ESearchBarClass, menu_activated),
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
@@ -839,12 +839,10 @@ class_init (ESearchBarClass *klass)
esb_signals [SEARCH_ACTIVATED] =
gtk_signal_new ("search_activated",
GTK_RUN_LAST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ESearchBarClass, search_activated),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, esb_signals, LAST_SIGNAL);
}
static void
@@ -926,7 +924,7 @@ e_search_bar_set_menu (ESearchBar *search_bar, ESearchBarItem *menu_items)
g_return_if_fail (search_bar != NULL);
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
- ((ESearchBarClass *)((GtkObject *)search_bar)->klass)->set_menu (search_bar, menu_items);
+ ((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_menu (search_bar, menu_items);
}
void
@@ -945,7 +943,7 @@ e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items)
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
g_return_if_fail (option_items != NULL);
- ((ESearchBarClass *)((GtkObject *)search_bar)->klass)->set_option (search_bar, option_items);
+ ((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_option (search_bar, option_items);
}
/**
diff --git a/widgets/misc/e-title-bar.c b/widgets/misc/e-title-bar.c
index 301aad108e..bcc645573d 100644
--- a/widgets/misc/e-title-bar.c
+++ b/widgets/misc/e-title-bar.c
@@ -261,21 +261,19 @@ class_init (ETitleBarClass *klass)
signals[LABEL_BUTTON_PRESS_EVENT] =
gtk_signal_new ("label_button_press_event",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ETitleBarClass, label_button_press_event),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
- GTK_TYPE_GDK_EVENT);
+ GTK_TYPE_POINTER);
signals[BUTTON_CLICKED] =
gtk_signal_new ("button_clicked",
GTK_RUN_FIRST,
- object_class->type,
+ GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (ETitleBarClass, button_clicked),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}
static void
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index e81ad4b8ea..4c0c477ebf 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -160,6 +160,6 @@ button_clicked_cb (GtkWidget *widget, gpointer data)
priv = url_entry->priv;
url = gtk_editable_get_chars (GTK_EDITABLE (priv->entry), 0, -1);
- gnome_url_show (url);
+ gnome_url_show (url, NULL);
g_free (url);
}
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 3fcf7d3706..8e0e9fe93b 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -32,8 +32,10 @@
#include <gtk/gtkdnd.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkvbox.h>
+
#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
+#include <libgnomeui/gnome-ui-init.h>
+
#include "e-calendar.h"
/* Drag and Drop stuff. */
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index 94771d8ebb..79038bc79c 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -34,8 +34,8 @@
#include <gtk/gtkmain.h>
#include <gtk/gtktable.h>
#include <gtk/gtkwindow.h>
+#include <libgnomeui/gnome-ui-init.h>
#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
#include "e-dateedit.h"
static void delete_event_cb (GtkWidget *widget,
@@ -61,7 +61,9 @@ main (int argc, char **argv)
EDateEdit *dedit;
GtkWidget *table, *button;
- gnome_init ("test-dateedit", "0.0", argc, argv);
+ gnome_program_init ("test-dateedit", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);
+
+ puts ("here");
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 300, 200);
diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c
index 36609faddd..349176d05c 100644
--- a/widgets/misc/test-dropdown-button.c
+++ b/widgets/misc/test-dropdown-button.c
@@ -31,10 +31,13 @@
#include <gtk/gtkmain.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkwindow.h>
+#include <gtk/gtkstock.h>
+
#include <libgnomeui/gnome-app.h>
#include <libgnomeui/gnome-app-helper.h>
-#include <libgnomeui/gnome-init.h>
-#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-ui-init.h>
+#include <libgnomeui/gnome-stock-icons.h>
+
#include "e-dropdown-button.h"
diff --git a/widgets/misc/test-title-bar.c b/widgets/misc/test-title-bar.c
index a3a5b359e3..d8bf6a08f2 100644
--- a/widgets/misc/test-title-bar.c
+++ b/widgets/misc/test-title-bar.c
@@ -26,10 +26,11 @@
#include <gtk/gtkbox.h>
#include <gtk/gtkmain.h>
-#include <gtk/gtktext.h>
#include <gtk/gtkvbox.h>
+#include <gtk/gtklabel.h>
+
#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
+#include <libgnomeui/gnome-ui-init.h>
#include "e-title-bar.h"
static void
@@ -45,7 +46,7 @@ main (int argc, char **argv)
{
GtkWidget *app;
GtkWidget *title_bar;
- GtkWidget *text;
+ GtkWidget *label;
GtkWidget *vbox;
gnome_init ("test-title-bar", "0.0", argc, argv);
@@ -59,12 +60,12 @@ main (int argc, char **argv)
title_bar = e_title_bar_new ("This is a very annoyingly long title bar");
gtk_widget_show (title_bar);
- text = gtk_text_new (NULL, NULL);
- gtk_widget_show (text);
+ label = gtk_label_new ("boo");
+ gtk_widget_show (label);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), title_bar, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), text, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
gtk_widget_show (vbox);
gnome_app_set_contents (GNOME_APP (app), vbox);