[Xfce4-commits] [apps/ristretto] 01/01: Prepare for gtk3 migration: Do not use deprecated symbols
noreply at xfce.org
noreply at xfce.org
Wed Sep 14 17:56:10 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/ristretto.
commit 123fc2daae0a1bc73de9bf32977ef609c8938770
Author: Igor <f2404 at yandex.ru>
Date: Wed Sep 14 18:56:04 2016 +0300
Prepare for gtk3 migration: Do not use deprecated symbols
---
src/gnome_wallpaper_manager.c | 6 +++---
src/icon_bar.c | 6 ++++--
src/image_viewer.c | 4 ++--
src/main_window.c | 25 +++++++++++++------------
src/preferences_dialog.c | 14 +++++++-------
src/privacy_dialog.c | 12 ++++++------
src/xfce_wallpaper_manager.c | 26 +++++++++++++-------------
7 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/src/gnome_wallpaper_manager.c b/src/gnome_wallpaper_manager.c
index c687327..0389d89 100644
--- a/src/gnome_wallpaper_manager.c
+++ b/src/gnome_wallpaper_manager.c
@@ -257,7 +257,7 @@ rstto_gnome_wallpaper_manager_init (GObject *object)
vbox = gtk_dialog_get_content_area ( GTK_DIALOG (manager->priv->dialog));
manager->priv->monitor_chooser = rstto_monitor_chooser_new ();
- manager->priv->style_combo = gtk_combo_box_new_text();
+ manager->priv->style_combo = gtk_combo_box_text_new ();
gtk_table_set_row_spacing (GTK_TABLE(image_prop_table), 1, 4);
@@ -308,8 +308,8 @@ rstto_gnome_wallpaper_manager_init (GObject *object)
0,
0);
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Auto"));
gtk_combo_box_set_active (
diff --git a/src/icon_bar.c b/src/icon_bar.c
index 7f0b830..86c9581 100644
--- a/src/icon_bar.c
+++ b/src/icon_bar.c
@@ -1113,7 +1113,8 @@ rstto_icon_bar_set_adjustments (
{
icon_bar->priv->hadjustment = hadj;
g_object_ref (icon_bar->priv->hadjustment);
- gtk_object_sink (GTK_OBJECT (icon_bar->priv->hadjustment));
+ // TODO: is this needed?
+ g_object_ref_sink (icon_bar->priv->hadjustment);
g_signal_connect (icon_bar->priv->hadjustment, "value_changed",
G_CALLBACK (cb_rstto_icon_bar_adjustment_value_changed), icon_bar);
@@ -1124,7 +1125,8 @@ rstto_icon_bar_set_adjustments (
{
icon_bar->priv->vadjustment = vadj;
g_object_ref (icon_bar->priv->vadjustment);
- gtk_object_sink (GTK_OBJECT (icon_bar->priv->vadjustment));
+ // TODO: is this needed?
+ g_object_ref_sink (icon_bar->priv->vadjustment);
g_signal_connect (icon_bar->priv->vadjustment, "value_changed",
G_CALLBACK (cb_rstto_icon_bar_adjustment_value_changed), icon_bar);
diff --git a/src/image_viewer.c b/src/image_viewer.c
index 63ee1d3..27c7aad 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -319,10 +319,10 @@ rstto_image_viewer_init ( GObject *object )
viewer->priv = g_new0(RsttoImageViewerPriv, 1);
viewer->priv->cb_value_changed = cb_rstto_image_viewer_value_changed;
- viewer->priv->settings = rstto_settings_new();
+ viewer->priv->settings = rstto_settings_new ();
viewer->priv->image_width = 0;
viewer->priv->image_height = 0;
- viewer->priv->visual = gdk_rgb_get_visual();
+ viewer->priv->visual = gdk_visual_get_system ();
viewer->priv->colormap = gdk_colormap_new (viewer->priv->visual, TRUE);
viewer->priv->icon_theme = gtk_icon_theme_get_default ();
diff --git a/src/main_window.c b/src/main_window.c
index 71cc511..88206ab 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -2168,23 +2168,23 @@ cb_rstto_main_window_set_as_wallpaper (GtkWidget *widget, RsttoMainWindow *windo
0);
choose_desktop_combo_box =
- gtk_combo_box_new_text();
+ gtk_combo_box_text_new ();
gtk_box_pack_start (
GTK_BOX (content_area),
choose_desktop_combo_box,
FALSE,
FALSE,
0);
- gtk_combo_box_insert_text(
- GTK_COMBO_BOX (choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (choose_desktop_combo_box),
DESKTOP_TYPE_NONE,
_("None"));
- gtk_combo_box_insert_text (
- GTK_COMBO_BOX (choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (choose_desktop_combo_box),
DESKTOP_TYPE_XFCE,
_("Xfce"));
- gtk_combo_box_insert_text (
- GTK_COMBO_BOX (choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (choose_desktop_combo_box),
DESKTOP_TYPE_GNOME,
_("GNOME"));
@@ -2390,14 +2390,15 @@ cb_rstto_main_window_state_event(GtkWidget *widget, GdkEventWindowState *event,
}
static gboolean
-cb_rstto_main_window_motion_notify_event (RsttoMainWindow *window,
- GdkEventMotion *event,
- gpointer user_data)
+cb_rstto_main_window_motion_notify_event (RsttoMainWindow *window, GdkEventMotion *event, gpointer user_data)
{
+ GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
gint width, height;
- if (gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET(window))) & GDK_WINDOW_STATE_FULLSCREEN)
+
+ if (gdk_window_get_state (gdk_window) & GDK_WINDOW_STATE_FULLSCREEN)
{
- gdk_drawable_get_size (GDK_DRAWABLE (gtk_widget_get_window (GTK_WIDGET (window))), &width, &height);
+ width = gdk_window_get_width (gdk_window);
+ height = gdk_window_get_height (gdk_window);
if ((event->x_root == 0) || (event->y_root == 0) || (((gint)event->x_root) == (width-1)) || (((gint)event->y_root) == (height-1)))
{
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index 84d9a0b..2297deb 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -475,23 +475,23 @@ rstto_preferences_dialog_init ( RsttoPreferencesDialog *dialog )
FALSE,
0);
dialog->priv->behaviour_tab.choose_desktop_combo_box =
- gtk_combo_box_new_text();
+ gtk_combo_box_text_new ();
gtk_box_pack_start (
GTK_BOX (dialog->priv->behaviour_tab.desktop_vbox),
dialog->priv->behaviour_tab.choose_desktop_combo_box,
FALSE,
FALSE,
0);
- gtk_combo_box_insert_text(
- GTK_COMBO_BOX (dialog->priv->behaviour_tab.choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (dialog->priv->behaviour_tab.choose_desktop_combo_box),
DESKTOP_TYPE_NONE,
_("None"));
- gtk_combo_box_insert_text (
- GTK_COMBO_BOX (dialog->priv->behaviour_tab.choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (dialog->priv->behaviour_tab.choose_desktop_combo_box),
DESKTOP_TYPE_XFCE,
_("Xfce"));
- gtk_combo_box_insert_text (
- GTK_COMBO_BOX (dialog->priv->behaviour_tab.choose_desktop_combo_box),
+ gtk_combo_box_text_insert_text (
+ GTK_COMBO_BOX_TEXT (dialog->priv->behaviour_tab.choose_desktop_combo_box),
DESKTOP_TYPE_GNOME,
_("GNOME"));
diff --git a/src/privacy_dialog.c b/src/privacy_dialog.c
index 47f28ca..6198168 100644
--- a/src/privacy_dialog.c
+++ b/src/privacy_dialog.c
@@ -154,12 +154,12 @@ rstto_privacy_dialog_init (RsttoPrivacyDialog *dialog)
dialog->priv->cleanup_vbox = gtk_vbox_new(FALSE, 0);
dialog->priv->cleanup_frame = xfce_gtk_frame_box_new_with_content(_("Cleanup"), dialog->priv->cleanup_vbox);
- dialog->priv->cleanup_timeframe_combo = gtk_combo_box_new_text();
- gtk_combo_box_insert_text(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 0, _("Last Hour"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 1, _("Last Two Hours"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 2, _("Last Four Hours"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 3, _("Today"));
- gtk_combo_box_insert_text(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 4, _("Everything"));
+ dialog->priv->cleanup_timeframe_combo = gtk_combo_box_text_new();
+ gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(dialog->priv->cleanup_timeframe_combo), 0, _("Last Hour"));
+ gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(dialog->priv->cleanup_timeframe_combo), 1, _("Last Two Hours"));
+ gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(dialog->priv->cleanup_timeframe_combo), 2, _("Last Four Hours"));
+ gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(dialog->priv->cleanup_timeframe_combo), 3, _("Today"));
+ gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(dialog->priv->cleanup_timeframe_combo), 4, _("Everything"));
g_signal_connect (G_OBJECT (dialog->priv->cleanup_timeframe_combo),
"changed", (GCallback)cb_rstto_privacy_dialog_combobox_timeframe_changed, dialog);
gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->priv->cleanup_timeframe_combo), 0);
diff --git a/src/xfce_wallpaper_manager.c b/src/xfce_wallpaper_manager.c
index 809609a..01b694a 100644
--- a/src/xfce_wallpaper_manager.c
+++ b/src/xfce_wallpaper_manager.c
@@ -443,7 +443,7 @@ rstto_xfce_wallpaper_manager_init (GObject *object)
saturation_slider = gtk_hscale_new (
GTK_ADJUSTMENT (manager->priv->saturation_adjustment));
manager->priv->monitor_chooser = rstto_monitor_chooser_new ();
- manager->priv->style_combo = gtk_combo_box_new_text();
+ manager->priv->style_combo = gtk_combo_box_text_new ();
gtk_table_set_row_spacing (GTK_TABLE(image_prop_table), 1, 4);
@@ -552,23 +552,23 @@ rstto_xfce_wallpaper_manager_init (GObject *object)
0,
0);
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Auto"));
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Centered"));
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Tiled"));
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Stretched"));
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Scaled"));
- gtk_combo_box_append_text (
- GTK_COMBO_BOX (manager->priv->style_combo),
+ gtk_combo_box_text_append_text (
+ GTK_COMBO_BOX_TEXT (manager->priv->style_combo),
_("Zoomed"));
gtk_combo_box_set_active (
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list