aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/idocalendarmenuitem.c40
-rw-r--r--src/idoentrymenuitem.c40
-rw-r--r--src/idomessagedialog.c8
-rw-r--r--src/idomessagedialog.h2
-rw-r--r--src/idorange.c2
-rw-r--r--src/idorange.h2
-rw-r--r--src/idoscalemenuitem.c6
-rw-r--r--src/idoscalemenuitem.h2
-rw-r--r--src/idotimeline.h2
10 files changed, 53 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index 0fcd778..1f644c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.19.7)
+PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.19.7)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c
index 6094d0d..2705ae8 100644
--- a/src/idocalendarmenuitem.c
+++ b/src/idocalendarmenuitem.c
@@ -26,8 +26,8 @@
#include <gdk/gdkkeysyms.h>
#include "idocalendarmenuitem.h"
-static void ido_calendar_menu_item_select (GtkItem *item);
-static void ido_calendar_menu_item_deselect (GtkItem *item);
+static void ido_calendar_menu_item_select (GtkMenuItem *item);
+static void ido_calendar_menu_item_deselect (GtkMenuItem *item);
static gboolean ido_calendar_menu_item_button_release (GtkWidget *widget,
GdkEventButton *event);
static gboolean ido_calendar_menu_item_button_press (GtkWidget *widget,
@@ -65,18 +65,17 @@ ido_calendar_menu_item_class_init (IdoCalendarMenuItemClass *klass)
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkMenuItemClass *menu_item_class;
- GtkItemClass *item_class;
+ GtkMenuItemClass *item_class;
gobject_class = G_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
menu_item_class = GTK_MENU_ITEM_CLASS (klass);
- item_class = GTK_ITEM_CLASS (klass);
widget_class->button_release_event = ido_calendar_menu_item_button_release;
widget_class->button_press_event = ido_calendar_menu_item_button_press;
- item_class->select = ido_calendar_menu_item_select;
- item_class->deselect = ido_calendar_menu_item_deselect;
+ menu_item_class->select = ido_calendar_menu_item_select;
+ menu_item_class->deselect = ido_calendar_menu_item_deselect;
menu_item_class->hide_on_activate = TRUE;
@@ -143,7 +142,7 @@ ido_calendar_menu_item_send_focus_change (GtkWidget *widget,
gtk_widget_grab_focus (widget);
event->focus_change.type = GDK_FOCUS_CHANGE;
- event->focus_change.window = g_object_ref (widget->window);
+ event->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
event->focus_change.in = in;
gtk_widget_event (widget, event);
@@ -168,9 +167,9 @@ ido_calendar_menu_item_key_press (GtkWidget *widget,
gtk_widget_event (calendar,
((GdkEvent *)(void*)(event)));
- if (calendar->window != NULL)
+ if (gtk_widget_get_window (calendar) != NULL)
{
- gdk_window_raise (calendar->window);
+ gdk_window_raise (gtk_widget_get_window (calendar));
}
if (!gtk_widget_has_focus (calendar))
@@ -178,7 +177,7 @@ ido_calendar_menu_item_key_press (GtkWidget *widget,
gtk_widget_grab_focus (calendar);
}
- return event->keyval != GDK_Return;
+ return event->keyval != GDK_KEY_Return;
}
return FALSE;
@@ -192,9 +191,9 @@ ido_calendar_menu_item_button_press (GtkWidget *widget,
if (event->button == 1)
{
- if (calendar->window != NULL)
+ if (gtk_widget_get_window (calendar) != NULL)
{
- gdk_window_raise (calendar->window);
+ gdk_window_raise (gtk_widget_get_window (calendar));
}
if (!gtk_widget_has_focus (calendar))
@@ -224,7 +223,7 @@ ido_calendar_menu_item_button_release (GtkWidget *widget,
}
static void
-ido_calendar_menu_item_select (GtkItem *item)
+ido_calendar_menu_item_select (GtkMenuItem *item)
{
IDO_CALENDAR_MENU_ITEM (item)->priv->selected = TRUE;
@@ -232,7 +231,7 @@ ido_calendar_menu_item_select (GtkItem *item)
}
static void
-ido_calendar_menu_item_deselect (GtkItem *item)
+ido_calendar_menu_item_deselect (GtkMenuItem *item)
{
IDO_CALENDAR_MENU_ITEM (item)->priv->selected = FALSE;
@@ -244,12 +243,12 @@ static void
calendar_realized_cb (GtkWidget *widget,
IdoCalendarMenuItem *item)
{
- if (widget->window != NULL)
+ if (gtk_widget_get_window (widget) != NULL)
{
- gdk_window_raise (widget->window);
+ gdk_window_raise (gtk_widget_get_window (widget));
}
- g_signal_connect (GTK_WIDGET (item)->parent,
+ g_signal_connect (gtk_widget_get_parent (GTK_WIDGET (item)),
"key-press-event",
G_CALLBACK (ido_calendar_menu_item_key_press),
item);
@@ -328,7 +327,9 @@ ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menuitem, guint day)
{
g_return_val_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem), FALSE);
- return gtk_calendar_mark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
+ gtk_calendar_mark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
+ return gtk_calendar_get_day_is_marked (GTK_CALENDAR (menuitem->priv->calendar), day);
+
}
gboolean
@@ -336,7 +337,8 @@ ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day)
{
g_return_val_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem), FALSE);
- return gtk_calendar_unmark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
+ gtk_calendar_unmark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
+ return !gtk_calendar_get_day_is_marked (GTK_CALENDAR (menuitem->priv->calendar), day);
}
void
diff --git a/src/idoentrymenuitem.c b/src/idoentrymenuitem.c
index b68c18f..a1a16cc 100644
--- a/src/idoentrymenuitem.c
+++ b/src/idoentrymenuitem.c
@@ -26,8 +26,8 @@
#include <gdk/gdkkeysyms.h>
#include "idoentrymenuitem.h"
-static void ido_entry_menu_item_select (GtkItem *item);
-static void ido_entry_menu_item_deselect (GtkItem *item);
+static void ido_entry_menu_item_select (GtkMenuItem *item);
+static void ido_entry_menu_item_deselect (GtkMenuItem *item);
static gboolean ido_entry_menu_item_button_release (GtkWidget *widget,
GdkEventButton *event);
static gboolean ido_entry_menu_item_key_press (GtkWidget *widget,
@@ -60,18 +60,16 @@ ido_entry_menu_item_class_init (IdoEntryMenuItemClass *klass)
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkMenuItemClass *menu_item_class;
- GtkItemClass *item_class;
gobject_class = G_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
menu_item_class = GTK_MENU_ITEM_CLASS (klass);
- item_class = GTK_ITEM_CLASS (klass);
widget_class->button_release_event = ido_entry_menu_item_button_release;
widget_class->button_press_event = ido_entry_menu_item_button_press;
- item_class->select = ido_entry_menu_item_select;
- item_class->deselect = ido_entry_menu_item_deselect;
+ menu_item_class->select = ido_entry_menu_item_select;
+ menu_item_class->deselect = ido_entry_menu_item_deselect;
menu_item_class->hide_on_activate = TRUE;
@@ -118,11 +116,11 @@ is_key_press_valid (IdoEntryMenuItem *item,
{
switch (key)
{
- case GDK_Escape:
- case GDK_Up:
- case GDK_Down:
- case GDK_KP_Up:
- case GDK_KP_Down:
+ case GDK_KEY_Escape:
+ case GDK_KEY_Up:
+ case GDK_KEY_Down:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_KP_Down:
return FALSE;
default:
@@ -145,11 +143,11 @@ ido_entry_menu_item_key_press (GtkWidget *widget,
gtk_widget_event (entry,
((GdkEvent *)(void*)(event)));
- /* We've handled the event, but if the key was GDK_Return
+ /* We've handled the event, but if the key was GDK_KEY_Return
* we still want to forward the event up to the menu shell
* to ensure that the menuitem receives the activate signal.
*/
- return event->keyval != GDK_Return;
+ return event->keyval != GDK_KEY_Return;
}
return FALSE;
@@ -164,7 +162,7 @@ ido_entry_menu_item_send_focus_change (GtkWidget *widget,
g_object_ref (widget);
event->focus_change.type = GDK_FOCUS_CHANGE;
- event->focus_change.window = g_object_ref (widget->window);
+ event->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
event->focus_change.in = in;
gtk_widget_event (widget, event);
@@ -183,9 +181,9 @@ ido_entry_menu_item_button_press (GtkWidget *widget,
if (event->button == 1)
{
- if (entry->window != NULL)
+ if (gtk_widget_get_window (entry) != NULL)
{
- gdk_window_raise (entry->window);
+ gdk_window_raise (gtk_widget_get_window (entry));
}
if (!gtk_widget_has_focus (entry))
@@ -215,7 +213,7 @@ ido_entry_menu_item_button_release (GtkWidget *widget,
}
static void
-ido_entry_menu_item_select (GtkItem *item)
+ido_entry_menu_item_select (GtkMenuItem *item)
{
IDO_ENTRY_MENU_ITEM (item)->priv->selected = TRUE;
@@ -223,7 +221,7 @@ ido_entry_menu_item_select (GtkItem *item)
}
static void
-ido_entry_menu_item_deselect (GtkItem *item)
+ido_entry_menu_item_deselect (GtkMenuItem *item)
{
IDO_ENTRY_MENU_ITEM (item)->priv->selected = FALSE;
@@ -235,12 +233,12 @@ static void
entry_realized_cb (GtkWidget *widget,
IdoEntryMenuItem *item)
{
- if (widget->window != NULL)
+ if (gtk_widget_get_window (widget) != NULL)
{
- gdk_window_raise (widget->window);
+ gdk_window_raise (gtk_widget_get_window (widget));
}
- g_signal_connect (GTK_WIDGET (item)->parent,
+ g_signal_connect (gtk_widget_get_parent (GTK_WIDGET (item)),
"key-press-event",
G_CALLBACK (ido_entry_menu_item_key_press),
item);
diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c
index ba73233..c5acb03 100644
--- a/src/idomessagedialog.c
+++ b/src/idomessagedialog.c
@@ -82,7 +82,7 @@ ido_message_dialog_map (GtkWidget *widget)
*
* See: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/240794
*/
- gdk_window_set_functions (widget->window,
+ gdk_window_set_functions (gtk_widget_get_window (widget),
GDK_FUNC_RESIZE | GDK_FUNC_MOVE);
ido_message_dialog_get_secondary_label (IDO_MESSAGE_DIALOG (widget));
@@ -166,14 +166,14 @@ ido_message_dialog_focus_in_event (GtkWidget *widget,
IdoTimeline *timeline;
IdoMessageDialogMorphContext *context;
- start = GTK_WIDGET (dialog)->requisition;
+ gtk_widget_get_requisition (GTK_WIDGET (dialog), &start);
priv->expanded = TRUE;
gtk_widget_show (priv->action_area);
gtk_widget_show (priv->secondary_label);
- gtk_widget_size_request (GTK_WIDGET (dialog), &end);
+ gtk_widget_get_requisition (GTK_WIDGET (dialog), &end);
gtk_widget_hide (priv->action_area);
gtk_widget_hide (priv->secondary_label);
@@ -209,7 +209,7 @@ ido_message_dialog_constructed (GObject *object)
event_box = gtk_event_box_new ();
gtk_widget_show (event_box);
- vbox = GTK_DIALOG (object)->vbox;
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG (object));
priv->action_area = gtk_dialog_get_action_area (GTK_DIALOG (object));
g_object_ref (G_OBJECT (vbox));
diff --git a/src/idomessagedialog.h b/src/idomessagedialog.h
index 4a44957..4313fb3 100644
--- a/src/idomessagedialog.h
+++ b/src/idomessagedialog.h
@@ -29,7 +29,7 @@
#ifndef __IDO_MESSAGE_DIALOG_H__
#define __IDO_MESSAGE_DIALOG_H__
-#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtk.h>
#define IDO_TYPE_MESSAGE_DIALOG (ido_message_dialog_get_type ())
#define IDO_MESSAGE_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), IDO_TYPE_MESSAGE_DIALOG, IdoMessageDialog))
diff --git a/src/idorange.c b/src/idorange.c
index c38ac88..55f7117 100644
--- a/src/idorange.c
+++ b/src/idorange.c
@@ -179,7 +179,7 @@ ido_range_init (IdoRange *range)
* Creates a new #IdoRange widget.
**/
GtkWidget *
-ido_range_new (GtkObject *adj,
+ido_range_new (GtkWidget *adj,
IdoRangeStyle style)
{
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adj), NULL);
diff --git a/src/idorange.h b/src/idorange.h
index a88a900..517d7fb 100644
--- a/src/idorange.h
+++ b/src/idorange.h
@@ -64,7 +64,7 @@ struct _IdoRangeClass
GType ido_range_get_type (void) G_GNUC_CONST;
-GtkWidget* ido_range_new (GtkObject *adj,
+GtkWidget* ido_range_new (GtkWidget *adj,
IdoRangeStyle style);
G_END_DECLS
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
index 39cecbb..5d522ca 100644
--- a/src/idoscalemenuitem.c
+++ b/src/idoscalemenuitem.c
@@ -213,7 +213,7 @@ ido_scale_menu_item_constructed (GObject *object)
{
IdoScaleMenuItem *self = IDO_SCALE_MENU_ITEM (object);
IdoScaleMenuItemPrivate *priv = GET_PRIVATE (self);
- GtkObject *adj = gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 10.0, 0.0);
+ GtkWidget *adj = gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 10.0, 0.0);
IdoRangeStyle range_style;
GtkWidget *hbox;
@@ -261,7 +261,7 @@ static void
ido_scale_menu_item_class_init (IdoScaleMenuItemClass *item_class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (item_class);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (item_class);
+ GtkWidgetClass *object_class = GTK_OBJECT_CLASS (item_class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (item_class);
widget_class->button_press_event = ido_scale_menu_item_button_press_event;
@@ -688,7 +688,7 @@ ido_scale_menu_item_new_with_range (const gchar *label,
gdouble max,
gdouble step)
{
- GtkObject *adjustment = gtk_adjustment_new (value, min, max, step, 10 * step, 0);
+ GtkWidget *adjustment = gtk_adjustment_new (value, min, max, step, 10 * step, 0);
return g_object_new (IDO_TYPE_SCALE_MENU_ITEM,
"label", label,
diff --git a/src/idoscalemenuitem.h b/src/idoscalemenuitem.h
index 44a9033..ee0691a 100644
--- a/src/idoscalemenuitem.h
+++ b/src/idoscalemenuitem.h
@@ -26,7 +26,7 @@
#ifndef __IDO_SCALE_MENU_ITEM_H__
#define __IDO_SCALE_MENU_ITEM_H__
-#include <gtk/gtkmenuitem.h>
+#include <gtk/gtk.h>
#include "idorange.h"
G_BEGIN_DECLS
diff --git a/src/idotimeline.h b/src/idotimeline.h
index 5df6b97..e26f9d3 100644
--- a/src/idotimeline.h
+++ b/src/idotimeline.h
@@ -21,7 +21,7 @@
#define __IDO_TIMELINE_H__
#include <glib-object.h>
-#include <gtk/gtkenums.h>
+#include <gtk/gtk.h>
#include <gdk/gdk.h>
G_BEGIN_DECLS