[rhythmbox] correct gtk+/glib version dependencies, update for deprecations
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] correct gtk+/glib version dependencies, update for deprecations
- Date: Tue, 28 Feb 2012 13:05:54 +0000 (UTC)
commit fe983801b70549fa345f1c14cb6a31b91732014a
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Feb 28 23:00:15 2012 +1000
correct gtk+/glib version dependencies, update for deprecations
configure.ac | 9 +++++++--
lib/rb-file-helpers.c | 3 ++-
lib/rb-tree-dnd.c | 6 +++++-
.../rb-audioscrobbler-profile-page.c | 4 ++--
.../rb-audioscrobbler-radio-source.c | 2 +-
plugins/grilo/rb-grilo-source.c | 2 +-
plugins/ipod/rb-ipod-db.c | 2 ++
plugins/iradio/rb-iradio-source.c | 2 +-
podcast/rb-podcast-source.c | 2 +-
rhythmdb/rhythmdb.c | 2 +-
shell/rb-shell.c | 18 +++++++++---------
sources/rb-auto-playlist-source.c | 2 +-
sources/rb-browser-source.c | 2 +-
sources/rb-import-errors-source.c | 2 +-
sources/rb-static-playlist-source.c | 2 +-
sources/sync/rb-sync-state-ui.c | 2 +-
widgets/gossip-cell-renderer-expander.c | 6 +++++-
widgets/rb-alert-dialog.c | 4 ++--
widgets/rb-cell-renderer-pixbuf.c | 6 +++++-
widgets/rb-cell-renderer-rating.c | 6 +++++-
widgets/rb-header.c | 10 +++++-----
widgets/rb-query-creator-properties.c | 4 ++--
widgets/rb-query-creator.c | 2 +-
widgets/rb-rating.c | 4 +++-
widgets/rb-song-info.c | 2 +-
widgets/test-rb-segmented-bar.c | 2 +-
26 files changed, 67 insertions(+), 41 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index da9d25c..cbc6284 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,11 +43,11 @@ m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(long)
-GTK_REQS=2.91.4
+GTK_REQS=3.2.0
GST_0_10_REQS=0.10.32
GDK_PIXBUF_REQS=2.18.0
-GLIB_REQS=2.26.0
+GLIB_REQS=2.28.0
LIBGPOD_REQS=0.6
MUSICBRAINZ3_REQS=3.0.2
TOTEM_PLPARSER_REQS=2.32.1
@@ -582,6 +582,11 @@ else
AC_MSG_RESULT(no)
fi
+dnl Set required and max glib/gdk versions
+AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_28, [minimum glib version])
+AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_28, [maximum glib version])
+AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_2, [minimum gdk version])
+AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_2, [maximum gdk version])
dnl Check for -fno-strict-aliasing
FLAGS="-fno-strict-aliasing"
diff --git a/lib/rb-file-helpers.c b/lib/rb-file-helpers.c
index 2d79ef2..b3424fe 100644
--- a/lib/rb-file-helpers.c
+++ b/lib/rb-file-helpers.c
@@ -34,6 +34,8 @@
* and dealing with file naming restrictions for various filesystems.
*/
+#include "config.h"
+
#include <gtk/gtk.h>
#include <glib.h>
#include <glib/gi18n.h>
@@ -42,7 +44,6 @@
#include <stdio.h>
#include <string.h>
-#include <config.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/lib/rb-tree-dnd.c b/lib/rb-tree-dnd.c
index df34ae1..ff0c38d 100644
--- a/lib/rb-tree-dnd.c
+++ b/lib/rb-tree-dnd.c
@@ -468,13 +468,17 @@ scroll_row_timeout (gpointer data)
gdouble vadj_value;
GtkAdjustment* vadj;
RbTreeDndData *priv_data;
+ GdkWindow *window;
+ GdkDeviceManager *device_manager;
GDK_THREADS_ENTER ();
priv_data = g_object_get_data (G_OBJECT (tree_view), RB_TREE_DND_STRING);
g_return_val_if_fail(priv_data != NULL, TRUE);
- gdk_window_get_pointer (gtk_tree_view_get_bin_window (tree_view), &x, &y, NULL);
+ window = gtk_tree_view_get_bin_window (tree_view);
+ device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
+ gdk_window_get_device_position (window, gdk_device_manager_get_client_pointer (device_manager), &x, &y, NULL);
gtk_tree_view_convert_widget_to_bin_window_coords (tree_view, x, y, &x, &y);
gtk_tree_view_convert_bin_window_to_tree_coords (tree_view, x, y, &x, &y);
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
index f236a8a..c6fe0d9 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
@@ -359,7 +359,7 @@ rb_audioscrobbler_profile_page_constructed (GObject *object)
g_object_unref (shell_player);
/* create the UI */
- page->priv->main_vbox = gtk_vbox_new (FALSE, 4);
+ page->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_box_pack_start (GTK_BOX (page), page->priv->main_vbox, TRUE, TRUE, 0);
gtk_widget_show (page->priv->main_vbox);
@@ -1591,7 +1591,7 @@ create_list_button (RBAudioscrobblerProfilePage *page,
gtk_button_set_relief (GTK_BUTTON (button),
GTK_RELIEF_NONE);
- button_contents = gtk_hbox_new (FALSE, 4);
+ button_contents = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_container_add (GTK_CONTAINER (button), button_contents);
if (data->image != NULL) {
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
index 11f4f34..1914f77 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-radio-source.c
@@ -452,7 +452,7 @@ rb_audioscrobbler_radio_source_constructed (GObject *object)
source->priv->art_store = rb_ext_db_new ("album-art");
- main_vbox = gtk_vbox_new (FALSE, 4);
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (main_vbox);
gtk_container_add (GTK_CONTAINER (source), main_vbox);
diff --git a/plugins/grilo/rb-grilo-source.c b/plugins/grilo/rb-grilo-source.c
index 3fd6ae8..5e6be8d 100644
--- a/plugins/grilo/rb-grilo-source.c
+++ b/plugins/grilo/rb-grilo-source.c
@@ -390,7 +390,7 @@ rb_grilo_source_constructed (GObject *object)
g_signal_connect (source->priv->info_bar, "response", G_CALLBACK (fetch_more_cb), source);
/* don't allow the browser to be hidden? */
- source->priv->paned = gtk_hpaned_new ();
+ source->priv->paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
rb_source_bind_settings (RB_SOURCE (source), GTK_WIDGET (source->priv->entry_view), source->priv->paned, NULL);
gtk_paned_pack1 (GTK_PANED (source->priv->paned), browserbox, FALSE, FALSE);
diff --git a/plugins/ipod/rb-ipod-db.c b/plugins/ipod/rb-ipod-db.c
index e78178e..7015a9d 100644
--- a/plugins/ipod/rb-ipod-db.c
+++ b/plugins/ipod/rb-ipod-db.c
@@ -24,6 +24,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
+#include "config.h"
+
#include <string.h>
#include "rb-ipod-db.h"
diff --git a/plugins/iradio/rb-iradio-source.c b/plugins/iradio/rb-iradio-source.c
index 5afb60d..fb73959 100644
--- a/plugins/iradio/rb-iradio-source.c
+++ b/plugins/iradio/rb-iradio-source.c
@@ -300,7 +300,7 @@ rb_iradio_source_constructed (GObject *object)
RB_CHAIN_GOBJECT_METHOD (rb_iradio_source_parent_class, constructed, object);
source = RB_IRADIO_SOURCE (object);
- paned = gtk_hpaned_new ();
+ paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
g_object_get (source, "shell", &shell, NULL);
g_object_get (shell,
diff --git a/podcast/rb-podcast-source.c b/podcast/rb-podcast-source.c
index 4b197f7..ead1609 100644
--- a/podcast/rb-podcast-source.c
+++ b/podcast/rb-podcast-source.c
@@ -1332,7 +1332,7 @@ impl_constructed (GObject *object)
source->priv->default_search = rb_source_search_basic_new (RHYTHMDB_PROP_SEARCH_MATCH);
- source->priv->paned = gtk_vpaned_new ();
+ source->priv->paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
g_object_unref (shell);
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index d18d47e..8d937c6 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -4543,7 +4543,7 @@ rhythmdb_compute_status_normal (gint n_songs,
}
}
- size_str = g_format_size_for_display (size);
+ size_str = g_format_size (size);
if (size > 0 && duration > 0) {
ret = g_strdup_printf ("%s, %s, %s", songcount, time, size_str);
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index 30e47ce..e244219 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -701,14 +701,14 @@ construct_widgets (RBShell *shell)
gtk_widget_set_no_show_all (shell->priv->queue_sidebar, TRUE);
/* places for plugins to put UI */
- shell->priv->top_container = GTK_BOX (gtk_vbox_new (FALSE, 0));
- shell->priv->bottom_container = GTK_BOX (gtk_vbox_new (FALSE, 0));
- shell->priv->sidebar_container = GTK_BOX (gtk_vbox_new (FALSE, 0));
- shell->priv->right_sidebar_container = GTK_BOX (gtk_vbox_new (FALSE, 0));
+ shell->priv->top_container = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
+ shell->priv->bottom_container = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
+ shell->priv->sidebar_container = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
+ shell->priv->right_sidebar_container = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
/* set up sidebars */
- shell->priv->paned = gtk_hpaned_new ();
- shell->priv->right_paned = gtk_hpaned_new ();
+ shell->priv->paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ shell->priv->right_paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_show_all (shell->priv->right_paned);
g_signal_connect_object (G_OBJECT (shell->priv->right_paned),
"size-allocate",
@@ -716,9 +716,9 @@ construct_widgets (RBShell *shell)
shell, 0);
gtk_widget_set_no_show_all (shell->priv->right_paned, TRUE);
{
- GtkWidget *vbox2 = gtk_vbox_new (FALSE, 0);
+ GtkWidget *vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- shell->priv->queue_paned = gtk_vpaned_new ();
+ shell->priv->queue_paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack1 (GTK_PANED (shell->priv->queue_paned),
GTK_WIDGET (shell->priv->display_page_tree),
FALSE, TRUE);
@@ -762,7 +762,7 @@ construct_widgets (RBShell *shell)
shell, 0);
gtk_widget_show (shell->priv->paned);
- shell->priv->main_vbox = gtk_vbox_new (FALSE, 0);
+ shell->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (shell->priv->main_vbox), 0);
gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), GTK_WIDGET (shell->priv->player_shell), FALSE, TRUE, 6);
gtk_widget_show (GTK_WIDGET (shell->priv->player_shell));
diff --git a/sources/rb-auto-playlist-source.c b/sources/rb-auto-playlist-source.c
index 3629456..6a346d2 100644
--- a/sources/rb-auto-playlist-source.c
+++ b/sources/rb-auto-playlist-source.c
@@ -278,7 +278,7 @@ rb_auto_playlist_source_constructed (GObject *object)
source = RB_AUTO_PLAYLIST_SOURCE (object);
priv = GET_PRIVATE (source);
- priv->paned = gtk_vpaned_new ();
+ priv->paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
g_object_get (RB_PLAYLIST_SOURCE (source), "entry-type", &entry_type, NULL);
priv->browser = rb_library_browser_new (rb_playlist_source_get_db (RB_PLAYLIST_SOURCE (source)),
diff --git a/sources/rb-browser-source.c b/sources/rb-browser-source.c
index 3fd306b..220b904 100644
--- a/sources/rb-browser-source.c
+++ b/sources/rb-browser-source.c
@@ -348,7 +348,7 @@ rb_browser_source_constructed (GObject *object)
source->priv->default_search = rb_source_search_basic_new (RHYTHMDB_PROP_SEARCH_MATCH);
- paned = gtk_vpaned_new ();
+ paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
source->priv->browser = rb_library_browser_new (source->priv->db, entry_type);
gtk_widget_set_no_show_all (GTK_WIDGET (source->priv->browser), TRUE);
diff --git a/sources/rb-import-errors-source.c b/sources/rb-import-errors-source.c
index 7e3de77..2eae5e6 100644
--- a/sources/rb-import-errors-source.c
+++ b/sources/rb-import-errors-source.c
@@ -253,7 +253,7 @@ rb_import_errors_source_constructed (GObject *object)
g_object_unref (entry_type);
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (source->priv->view), TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (box), source->priv->infobar, FALSE, FALSE, 0);
diff --git a/sources/rb-static-playlist-source.c b/sources/rb-static-playlist-source.c
index 2ebcbac..6c8722e 100644
--- a/sources/rb-static-playlist-source.c
+++ b/sources/rb-static-playlist-source.c
@@ -319,7 +319,7 @@ rb_static_playlist_source_constructed (GObject *object)
G_CALLBACK (rb_static_playlist_source_filter_entry_drop),
source, 0);
- paned = gtk_vpaned_new ();
+ paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_widget_set_hexpand (paned, TRUE);
gtk_widget_set_vexpand (paned, TRUE);
diff --git a/sources/sync/rb-sync-state-ui.c b/sources/sync/rb-sync-state-ui.c
index cd37cfa..2dd8f94 100644
--- a/sources/sync/rb-sync-state-ui.c
+++ b/sources/sync/rb-sync-state-ui.c
@@ -60,7 +60,7 @@ G_DEFINE_TYPE (RBSyncStateUI, rb_sync_state_ui, GTK_TYPE_VBOX)
static char *
value_formatter (gdouble percent, RBSyncBarData *bar)
{
- return g_format_size_for_display (percent * bar->capacity);
+ return g_format_size (percent * bar->capacity);
}
void
diff --git a/widgets/gossip-cell-renderer-expander.c b/widgets/gossip-cell-renderer-expander.c
index ce0959a..04b0ed7 100644
--- a/widgets/gossip-cell-renderer-expander.c
+++ b/widgets/gossip-cell-renderer-expander.c
@@ -323,7 +323,11 @@ gossip_cell_renderer_expander_activate (GtkCellRenderer *cell,
path = gtk_tree_path_new_from_string (path_string);
- gtk_widget_get_pointer (widget, &mouse_x, &mouse_y);
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_event_get_source_device (event),
+ &mouse_x,
+ &mouse_y,
+ NULL);
gtk_tree_view_convert_widget_to_bin_window_coords (GTK_TREE_VIEW (widget),
mouse_x, mouse_y,
&mouse_x, &mouse_y);
diff --git a/widgets/rb-alert-dialog.c b/widgets/rb-alert-dialog.c
index 230bde9..465b441 100644
--- a/widgets/rb-alert-dialog.c
+++ b/widgets/rb-alert-dialog.c
@@ -152,13 +152,13 @@ rb_alert_dialog_init (RBAlertDialog *dialog)
gtk_label_set_selectable (GTK_LABEL (dialog->details->details_label), TRUE);
gtk_misc_set_alignment (GTK_MISC (dialog->details->details_label), 0.0, 0.5);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (hbox), dialog->details->image,
FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox,
FALSE, FALSE, 0);
diff --git a/widgets/rb-cell-renderer-pixbuf.c b/widgets/rb-cell-renderer-pixbuf.c
index 979d7d1..08fdd97 100644
--- a/widgets/rb-cell-renderer-pixbuf.c
+++ b/widgets/rb-cell-renderer-pixbuf.c
@@ -132,7 +132,11 @@ rb_cell_renderer_pixbuf_activate (GtkCellRenderer *cell,
return FALSE;
}
- gtk_widget_get_pointer (widget, &mouse_x, &mouse_y);
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_event_get_source_device (event),
+ &mouse_x,
+ &mouse_y,
+ NULL);
gtk_tree_view_convert_widget_to_bin_window_coords (GTK_TREE_VIEW (widget),
mouse_x, mouse_y,
&mouse_x, &mouse_y);
diff --git a/widgets/rb-cell-renderer-rating.c b/widgets/rb-cell-renderer-rating.c
index 3574dc9..887fbe7 100644
--- a/widgets/rb-cell-renderer-rating.c
+++ b/widgets/rb-cell-renderer-rating.c
@@ -303,7 +303,11 @@ rb_cell_renderer_rating_activate (GtkCellRenderer *cell,
g_return_val_if_fail (RB_IS_CELL_RENDERER_RATING (cellrating), FALSE);
- gtk_widget_get_pointer (widget, &mouse_x, &mouse_y);
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_event_get_source_device (event),
+ &mouse_x,
+ &mouse_y,
+ NULL);
gtk_tree_view_convert_widget_to_bin_window_coords (GTK_TREE_VIEW (widget),
mouse_x, mouse_y,
&mouse_x, &mouse_y);
diff --git a/widgets/rb-header.c b/widgets/rb-header.c
index 2a21756..d18abbf 100644
--- a/widgets/rb-header.c
+++ b/widgets/rb-header.c
@@ -238,12 +238,12 @@ rb_header_init (RBHeader *header)
gtk_box_set_spacing (GTK_BOX (header), 3);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (header), vbox, TRUE, TRUE, 0);
/* song info */
- hbox = gtk_hbox_new (FALSE, 16);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 16);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show (hbox);
@@ -256,7 +256,7 @@ rb_header_init (RBHeader *header)
gtk_widget_show (header->priv->song);
/* construct the time display */
- header->priv->timeline = gtk_hbox_new (FALSE, 3);
+ header->priv->timeline = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
header->priv->elapsed = gtk_label_new ("");
gtk_misc_set_padding (GTK_MISC (header->priv->elapsed), 2, 0);
@@ -265,11 +265,11 @@ rb_header_init (RBHeader *header)
gtk_widget_show_all (header->priv->timeline);
/* row for the position slider */
- header->priv->scaleline = gtk_hbox_new (FALSE, 3);
+ header->priv->scaleline = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
gtk_box_pack_start (GTK_BOX (vbox), header->priv->scaleline, FALSE, FALSE, 0);
header->priv->adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 10.0, 1.0, 10.0, 0.0));
- header->priv->scale = gtk_hscale_new (header->priv->adjustment);
+ header->priv->scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, header->priv->adjustment);
g_signal_connect_object (G_OBJECT (header->priv->scale),
"button_press_event",
G_CALLBACK (slider_press_callback),
diff --git a/widgets/rb-query-creator-properties.c b/widgets/rb-query-creator-properties.c
index c877835..148970b 100644
--- a/widgets/rb-query-creator-properties.c
+++ b/widgets/rb-query-creator-properties.c
@@ -482,7 +482,7 @@ durationCriteriaCreateWidget (gboolean *constrain)
GtkWidget *secondsSpin;
/* the widget for Duration is set out like the following [ 2] : [30] */
- box = GTK_BOX (gtk_hbox_new (FALSE, 3));
+ box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3));
minutesSpin = gtk_spin_button_new_with_range (0.0, (double)((G_MAXINT - 59) / 60), 1.0);
gtk_box_pack_start (box, minutesSpin, FALSE, FALSE, 0);
@@ -560,7 +560,7 @@ relativeTimeCriteriaCreateWidget (gboolean *constrain)
GtkWidget *timeSpin;
GtkWidget *timeOption;
- box = GTK_BOX (gtk_hbox_new (FALSE, 6));
+ box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6));
timeSpin = gtk_spin_button_new_with_range (1.0, G_MAXINT, 1.0);
gtk_box_pack_start (box, timeSpin, TRUE, TRUE, 0);
diff --git a/widgets/rb-query-creator.c b/widgets/rb-query-creator.c
index 0a887a2..33591b6 100644
--- a/widgets/rb-query-creator.c
+++ b/widgets/rb-query-creator.c
@@ -783,7 +783,7 @@ append_row (RBQueryCreator *creator)
GtkBox *hbox;
gboolean constrain;
- hbox = GTK_BOX (gtk_hbox_new (FALSE, 5));
+ hbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5));
gtk_box_pack_start (GTK_BOX (priv->vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
priv->rows = g_list_prepend (priv->rows, hbox);
gtk_box_reorder_child (priv->vbox, GTK_WIDGET (hbox), -1);
diff --git a/widgets/rb-rating.c b/widgets/rb-rating.c
index d8857d1..f72bb00 100644
--- a/widgets/rb-rating.c
+++ b/widgets/rb-rating.c
@@ -432,7 +432,9 @@ rb_rating_button_press_cb (GtkWidget *widget,
rating = RB_RATING (widget);
- gtk_widget_get_pointer (widget, &mouse_x, &mouse_y);
+ gdk_window_get_device_position (gtk_widget_get_window (widget),
+ gdk_event_get_source_device ((GdkEvent *)event),
+ &mouse_x, &mouse_y, NULL);
gtk_widget_get_allocation (widget, &allocation);
new_rating = rb_rating_get_rating_from_widget (widget, mouse_x,
diff --git a/widgets/rb-song-info.c b/widgets/rb-song-info.c
index 835ef49..5792b7e 100644
--- a/widgets/rb-song-info.c
+++ b/widgets/rb-song-info.c
@@ -1180,7 +1180,7 @@ rb_song_info_update_filesize (RBSongInfo *song_info)
char *text = NULL;
guint64 filesize = 0;
filesize = rhythmdb_entry_get_uint64 (song_info->priv->current_entry, RHYTHMDB_PROP_FILE_SIZE);
- text = g_format_size_for_display (filesize);
+ text = g_format_size (filesize);
gtk_label_set_text (GTK_LABEL (song_info->priv->filesize), text);
g_free (text);
}
diff --git a/widgets/test-rb-segmented-bar.c b/widgets/test-rb-segmented-bar.c
index 109432b..f2e6ae9 100644
--- a/widgets/test-rb-segmented-bar.c
+++ b/widgets/test-rb-segmented-bar.c
@@ -41,7 +41,7 @@ static gchar *value_formatter (gdouble percent, gpointer data)
{
gsize total_size = GPOINTER_TO_SIZE (data);
- return g_format_size_for_display (percent * total_size*1024*1024*1024);
+ return g_format_size (percent * total_size*1024*1024*1024);
}
int main (int argc, char **argv)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]