aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-04 19:05:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-04 20:34:15 +0800
commit970662db34ff0a718cd5e39c1fa268beb51e1f64 (patch)
tree73c987b95c107ae7e3014abdca4c95de12dc853d /calendar
parent3ee48d9bf66fbc76b7b06e77aafa015c341cd419 (diff)
downloadgsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.gz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.bz2
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.lz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.xz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.zst
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.zip
More GTK3 preparation.
This uses the new gtk_assistant_commit() I had added to GTK+ for our EImportAssistant progress page.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/event-editor.c2
-rw-r--r--calendar/gui/ea-cal-view.c12
-rw-r--r--calendar/gui/ea-day-view.c28
-rw-r--r--calendar/gui/ea-gnome-calendar.c12
-rw-r--r--calendar/gui/ea-week-view.c29
5 files changed, 59 insertions, 24 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 0b70aef600..96242c0bda 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -332,7 +332,7 @@ event_editor_constructor (GType type,
page = COMP_EDITOR_PAGE (priv->recur_page);
if (!e_shell_get_express_mode (shell)) {
gtk_container_add (
- GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)),
+ GTK_CONTAINER (content_area),
comp_editor_page_get_widget (page));
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window)));
comp_editor_append_page (editor, page, NULL, FALSE);
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 67969c75ec..a012154004 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -28,6 +28,8 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <e-util/gtk-compat.h>
+
static void ea_cal_view_class_init (EaCalViewClass *klass);
static AtkObject* ea_cal_view_get_parent (AtkObject *accessible);
@@ -172,13 +174,15 @@ ea_cal_view_get_parent (AtkObject *accessible)
{
ECalendarView *cal_view;
GnomeCalendar *gnomeCalendar;
+ GtkWidget *widget;
g_return_val_if_fail (EA_IS_CAL_VIEW (accessible), NULL);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- cal_view = E_CALENDAR_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+ cal_view = E_CALENDAR_VIEW (widget);
gnomeCalendar = e_calendar_view_get_calendar (cal_view);
return gtk_widget_get_accessible (GTK_WIDGET(gnomeCalendar));
@@ -324,7 +328,7 @@ action_interface_do_action (AtkAction *action, gint index)
time_t dtstart, dtend;
ECalendarView *cal_view;
- widget = GTK_ACCESSIBLE (action)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
if (widget == NULL)
/*
* State is defunct
@@ -388,7 +392,7 @@ action_interface_get_keybinding (AtkAction *action, gint index)
{
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (action)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
if (widget == NULL)
/*
* State is defunct
diff --git a/calendar/gui/ea-day-view.c b/calendar/gui/ea-day-view.c
index d197f49e04..991a78e92d 100644
--- a/calendar/gui/ea-day-view.c
+++ b/calendar/gui/ea-day-view.c
@@ -28,6 +28,8 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <e-util/gtk-compat.h>
+
static void ea_day_view_class_init (EaDayViewClass *klass);
static G_CONST_RETURN gchar * ea_day_view_get_name (AtkObject *accessible);
@@ -123,15 +125,17 @@ ea_day_view_get_name (AtkObject *accessible)
GnomeCalendar *gcal;
const gchar *label_text;
GnomeCalendarViewType view_type;
+ GtkWidget *widget;
gint n_events;
gchar *event_str, *name_str;
g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+ day_view = E_DAY_VIEW (widget);
gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
if (!gtk_widget_get_visible (GTK_WIDGET (gcal)))
return NULL;
@@ -177,12 +181,15 @@ static G_CONST_RETURN gchar *
ea_day_view_get_description (AtkObject *accessible)
{
EDayView *day_view;
+ GtkWidget *widget;
g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+
+ day_view = E_DAY_VIEW (widget);
if (accessible->description)
return accessible->description;
@@ -204,15 +211,17 @@ static gint
ea_day_view_get_n_children (AtkObject *accessible)
{
EDayView *day_view;
+ GtkWidget *widget;
gint day;
gint child_num = 0;
g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), -1);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return -1;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+ day_view = E_DAY_VIEW (widget);
child_num += day_view->long_events->len;
@@ -232,6 +241,7 @@ ea_day_view_ref_child (AtkObject *accessible, gint index)
gint day;
AtkObject *atk_object = NULL;
EDayViewEvent *event = NULL;
+ GtkWidget *widget;
g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
@@ -239,9 +249,11 @@ ea_day_view_ref_child (AtkObject *accessible, gint index)
if (child_num <= 0 || index < 0 || index >= child_num)
return NULL;
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+
+ day_view = E_DAY_VIEW (widget);
if (index == 0) {
/* index == 0 is the main item */
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index 1f599c1790..e35ef1401e 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -29,6 +29,8 @@
#include <libedataserver/e-data-server-util.h>
#include <glib/gi18n.h>
+#include <e-util/gtk-compat.h>
+
static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass);
static gint ea_gnome_calendar_get_n_children (AtkObject* obj);
@@ -253,8 +255,9 @@ ea_gnome_calendar_get_n_children (AtkObject* obj)
{
g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), 0);
- if (!GTK_ACCESSIBLE (obj)->widget)
+ if (gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)) == NULL)
return -1;
+
return 2;
}
@@ -267,15 +270,18 @@ ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
ECalendarView *view;
ECalendar *date_navigator;
GtkWidget *childWidget;
+ GtkWidget *widget;
g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), NULL);
/* valid child index range is [0-3] */
if (i < 0 || i >3 )
return NULL;
- if (!GTK_ACCESSIBLE (obj)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+ if (widget == NULL)
return NULL;
- calendarWidget = GNOME_CALENDAR (GTK_ACCESSIBLE (obj)->widget);
+
+ calendarWidget = GNOME_CALENDAR (widget);
switch (i) {
case 0:
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index a34326cf74..14bb456219 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -27,6 +27,8 @@
#include <text/e-text.h>
#include <glib/gi18n.h>
+#include <e-util/gtk-compat.h>
+
static void ea_week_view_class_init (EaWeekViewClass *klass);
static G_CONST_RETURN gchar * ea_week_view_get_name (AtkObject *accessible);
@@ -124,15 +126,17 @@ ea_week_view_get_name (AtkObject *accessible)
GnomeCalendar *gcal;
const gchar *label_text;
GnomeCalendarViewType view_type;
+ GtkWidget *widget;
gint n_events;
gchar *event_str, *name_str;
g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+ week_view = E_WEEK_VIEW (widget);
gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
if (!gtk_widget_get_visible (GTK_WIDGET (gcal)))
return NULL;
@@ -168,12 +172,15 @@ static G_CONST_RETURN gchar *
ea_week_view_get_description (AtkObject *accessible)
{
EWeekView *week_view;
+ GtkWidget *widget;
g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+
+ week_view = E_WEEK_VIEW (widget);
if (accessible->description)
return accessible->description;
@@ -195,14 +202,17 @@ static gint
ea_week_view_get_n_children (AtkObject *accessible)
{
EWeekView *week_view;
+ GtkWidget *widget;
gint i, count = 0;
gint event_index;
g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), -1);
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return -1;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+
+ week_view = E_WEEK_VIEW (widget);
for (event_index = 0; event_index < week_view->events->len;
++event_index) {
@@ -249,6 +259,7 @@ ea_week_view_ref_child (AtkObject *accessible, gint index)
EWeekView *week_view;
gint child_num, max_count;
AtkObject *atk_object = NULL;
+ GtkWidget *widget;
gint event_index;
gint jump_button = -1;
gint span_num = 0;
@@ -260,9 +271,11 @@ ea_week_view_ref_child (AtkObject *accessible, gint index)
if (child_num <= 0 || index < 0 || index >= child_num)
return NULL;
- if (!GTK_ACCESSIBLE (accessible)->widget)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+ if (widget == NULL)
return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
+
+ week_view = E_WEEK_VIEW (widget);
max_count = week_view->events->len;
if (index == 0) {