[gok] Remove deprecated GTK+ symbols - bgo#572686
- From: Gerd Kohlberger <gerdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gok] Remove deprecated GTK+ symbols - bgo#572686
- Date: Sun, 3 May 2009 15:02:38 -0400 (EDT)
commit f1ce0079931b57afac49fabb398405266f985f98
Author: Gerd Kohlberger <gerdk src gnome org>
Date: Mon Apr 27 13:42:44 2009 +0200
Remove deprecated GTK+ symbols - bgo#572686
- gdk_cursor_destroy
- gdk_window_get_size
- gtk_entry_set_editable
- gtk_radio_button_group
- gtk_toggle_button_set_state
- gtk_tooltips_new
- GtkTooltips
---
gok/callbacks.c | 6 +++---
gok/gok-key.c | 6 +++---
gok/gok-keyboard.c | 7 +++----
gok/gok-page-accessmethod.c | 4 ++--
gok/gok-page-keysizespace.c | 9 +++------
gok/main.c | 4 ++--
6 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/gok/callbacks.c b/gok/callbacks.c
index 3543029..32bef65 100644
--- a/gok/callbacks.c
+++ b/gok/callbacks.c
@@ -1,7 +1,7 @@
/* callbacks.c
*
-* Copyright 2002 Sun Microsystems, Inc.,
-* Copyright 2002 University Of Toronto
+* Copyright 2002-2009 Sun Microsystems, Inc.,
+* Copyright 2002-2009 University Of Toronto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -179,7 +179,7 @@ on_window1_enter_notify_event (GtkWidget *widget,
{
cursor = gdk_cursor_new (GDK_ARROW);
gok_main_set_cursor (cursor);
- gdk_cursor_destroy (cursor);
+ gdk_cursor_unref (cursor);
}
}
return FALSE;
diff --git a/gok/gok-key.c b/gok/gok-key.c
index 295ce2e..a9e4b5d 100644
--- a/gok/gok-key.c
+++ b/gok/gok-key.c
@@ -1,7 +1,7 @@
/* gok-key.c
*
-* Copyright 2001,2002 Sun Microsystems, Inc.,
-* Copyright 2001,2002 University Of Toronto
+* Copyright 2001-2009 Sun Microsystems, Inc.,
+* Copyright 2001-2009 University Of Toronto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -1911,7 +1911,7 @@ gok_key_update_toggle_state (GokKey *pKey)
if (pKey->ComponentState.radio) {
GOK_BUTTON (pKey->pButton)->indicator_type = /*g_strdup( ?*/ "radiobutton" /*)*/;
}
- gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (pKey->pButton),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pKey->pButton),
is_active);
}
gok_log_leave();
diff --git a/gok/gok-keyboard.c b/gok/gok-keyboard.c
index 0b90789..e6961df 100644
--- a/gok/gok-keyboard.c
+++ b/gok/gok-keyboard.c
@@ -2052,8 +2052,7 @@ gboolean gok_keyboard_display (GokKeyboard* pKeyboard, GokKeyboard* pKeyboardCur
}
else if (pKeyboard->shape == KEYBOARD_SHAPE_FITWINDOW)
{
- gdk_window_get_size ((GdkWindow*)pWindowMain->window, &widthMax,
- &heightMax);
+ gdk_drawable_get_size (pWindowMain->window, &widthMax, &heightMax);
}
else
{
@@ -2146,7 +2145,7 @@ void gok_keyboard_position_keys (GokKeyboard* pKeyboard, GtkWidget* pWindow)
if (pWindow->window)
{
gint widthWindow, heightWindow;
- gdk_window_get_size (pWindow->window, &widthWindow, &heightWindow);
+ gdk_drawable_get_size (pWindow->window, &widthWindow, &heightWindow);
widthKey = (double) widthWindow / pKeyboard->NumberColumns - spacingKey;
}
}
@@ -4410,7 +4409,7 @@ void gok_keyboard_on_window_resize ()
}
/* compare the size of the window to the size we made the window */
- gdk_window_get_size (pWindow->window, &widthWindow, &heightWindow);
+ gdk_drawable_get_size (pWindow->window, &widthWindow, &heightWindow);
gok_main_get_our_window_size (&widthWindowPrevious, &heightWindowPrevious);
#ifndef BUG_133323_LIVES
diff --git a/gok/gok-page-accessmethod.c b/gok/gok-page-accessmethod.c
index 1df7689..2f2d125 100644
--- a/gok/gok-page-accessmethod.c
+++ b/gok/gok-page-accessmethod.c
@@ -650,7 +650,7 @@ void gok_page_accessmethod_draw_controls (gchar* NameAccessMethod, GokControl* p
/* make the combo's entry field NOT editable */
pEntry = GTK_COMBO (pWidget)->entry;
- gtk_entry_set_editable (GTK_ENTRY (pEntry), FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (pEntry), FALSE);
/* create a new object to hold info about the filled combo */
/* the combo gets filled in gok_page_accessmethod_fill_combos */
@@ -748,7 +748,7 @@ void gok_page_accessmethod_draw_controls (gchar* NameAccessMethod, GokControl* p
}
pWidget = gtk_radio_button_new_with_label (ListRadioButtons, pControl->String);
- ListRadioButtons = gtk_radio_button_group (GTK_RADIO_BUTTON (pWidget));
+ ListRadioButtons = gtk_radio_button_get_group (GTK_RADIO_BUTTON (pWidget));
g_object_ref (pWidget);
g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
"GOKradiobutton", pWidget,
diff --git a/gok/gok-page-keysizespace.c b/gok/gok-page-keysizespace.c
index f315986..dd4fdfe 100644
--- a/gok/gok-page-keysizespace.c
+++ b/gok/gok-page-keysizespace.c
@@ -1,7 +1,7 @@
/* gok-page-keysizespace.c
*
-* Copyright 2002 Sun Microsystems, Inc.,
-* Copyright 2002 University Of Toronto
+* Copyright 2002-2009 Sun Microsystems, Inc.,
+* Copyright 2002-2009 University Of Toronto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -53,7 +53,6 @@ gboolean gok_settings_page_keysizespace_initialize (GladeXML * xml)
GtkWidget* fixedKeySpacing;
GtkWidget* pWindowSettings;
GtkWidget* widget;
- GtkTooltips *tooltips;
gint i;
g_assert (xml != NULL);
@@ -67,8 +66,6 @@ gboolean gok_settings_page_keysizespace_initialize (GladeXML * xml)
/* backup the initial settings */
gok_settings_page_keysizespace_backup();
- tooltips = gtk_tooltips_new ();
-
/* create the example buttons for key size/spacing */
/* I'm doing this here because Glade doesn't know about GokButtons */
@@ -352,7 +349,7 @@ void gok_settings_page_keysizespace_display_keysizespacing (gint KeyWidth, gint
if (GDK_IS_DRAWABLE(pWindowSettings->window) == TRUE)
{
- gdk_window_get_size (pWindowSettings->window, &width, NULL);
+ gdk_drawable_get_size (pWindowSettings->window, &width, NULL);
left = ((width - 32) - ((KeyWidth * 2) + Space)) / 2;
}
diff --git a/gok/main.c b/gok/main.c
index 152a6eb..8baf57a 100644
--- a/gok/main.c
+++ b/gok/main.c
@@ -2718,7 +2718,7 @@ void gok_main_store_window_center ()
/* get the center of the current window */
gdk_window_get_position (m_pWindowMain->window, &winX, &winY);
- gdk_window_get_size (m_pWindowMain->window, &winWidthCurrent, &winHeightCurrent);
+ gdk_drawable_get_size (m_pWindowMain->window, &winWidthCurrent, &winHeightCurrent);
winX += winWidthCurrent / 2;
winY += winHeightCurrent / 2;
@@ -2904,7 +2904,7 @@ gok_main_window_contains_pointer (void)
gdk_window_get_position (widget->window, &x, &y);
x = px-x;
y = py-y;
- gdk_window_get_size (widget->window, &w, &h);
+ gdk_drawable_get_size (widget->window, &w, &h);
}
if (x < 0 || y < 0 || x > w || y > h)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]