[gnome-applets] don't use deprecated gtk_widget_size_request
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] don't use deprecated gtk_widget_size_request
- Date: Mon, 24 Nov 2014 06:14:05 +0000 (UTC)
commit c05c6b07ec493d174062a06caf185d324fd6e0c4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Nov 24 08:10:29 2014 +0200
don't use deprecated gtk_widget_size_request
battstat/battstat_applet.c | 2 +-
charpick/charpick.c | 4 ++--
drivemount/drive-button.c | 6 +++---
mini-commander/src/command_line.c | 2 +-
stickynotes/stickynotes_applet.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index e037e1b..650a76b 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -511,7 +511,7 @@ battery_low_update_text( ProgressData *battstat, BatteryStatus *info )
battstat->battery_low_dialog == NULL )
return;
- gtk_widget_size_request( GTK_WIDGET( battstat->battery_low_label ), &size );
+ gtk_widget_get_preferred_size (GTK_WIDGET (battstat->battery_low_label), NULL, &size);
/* If the label has never been set before, the width will be 0. If it
has been set before (width > 0) then we want to keep the size of
diff --git a/charpick/charpick.c b/charpick/charpick.c
index cbbacdd..dac9547 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -323,7 +323,7 @@ get_menu_pos (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data)
gint tempx, tempy, width, height;
gint screen_width, screen_height;
- gtk_widget_size_request (GTK_WIDGET (menu), &reqmenu);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &reqmenu);
window = gtk_widget_get_window (curr_data->applet);
gdk_window_get_origin (window, &tempx, &tempy);
width = gdk_window_get_width (window);
@@ -480,7 +480,7 @@ build_table(charpick_data *p_curr_data)
gtk_widget_set_tooltip_text (toggle_button[i], name);
g_free (name);
- gtk_widget_size_request (toggle_button[i], &req);
+ gtk_widget_get_preferred_size (toggle_button[i], NULL, &req);
max_width = MAX (max_width, req.width);
max_height = MAX (max_height, req.height-2);
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index a615392..6de542d 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -357,8 +357,8 @@ drive_button_update (gpointer user_data)
g_free (display_name);
/* base the icon size on the desired button size */
- gtk_widget_size_request (GTK_WIDGET (self), &button_req);
- gtk_widget_size_request (gtk_bin_get_child (GTK_BIN (self)), &image_req);
+ gtk_widget_get_preferred_size (GTK_WIDGET (self), NULL, &button_req);
+ gtk_widget_get_preferred_size (gtk_bin_get_child (GTK_BIN (self)), NULL, &image_req);
width = self->icon_size - (button_req.width - image_req.width);
height = self->icon_size - (button_req.height - image_req.height);
@@ -387,7 +387,7 @@ drive_button_update (gpointer user_data)
gtk_image_set_from_pixbuf (GTK_IMAGE (gtk_bin_get_child (GTK_BIN (self))), pixbuf);
g_object_unref (pixbuf);
- gtk_widget_size_request (GTK_WIDGET (self), &button_req);
+ gtk_widget_get_preferred_size (GTK_WIDGET (self), NULL, &button_req);
return FALSE;
}
diff --git a/mini-commander/src/command_line.c b/mini-commander/src/command_line.c
index cb5dd99..4464ac8 100644
--- a/mini-commander/src/command_line.c
+++ b/mini-commander/src/command_line.c
@@ -398,7 +398,7 @@ mc_show_history (GtkWidget *widget,
gtk_container_add(GTK_CONTAINER(scrolled_window),treeview);
gtk_widget_show (treeview);
- gtk_widget_size_request (window, &req);
+ gtk_widget_get_preferred_size (window, NULL, &req);
gdk_window = gtk_widget_get_window (GTK_WIDGET (mc->applet));
gdk_window_get_origin (gdk_window, &x, &y);
gdk_window_get_geometry (gdk_window, NULL, NULL,
diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c
index 353d52c..8ddac50 100644
--- a/stickynotes/stickynotes_applet.c
+++ b/stickynotes/stickynotes_applet.c
@@ -580,7 +580,7 @@ stickynotes_applet_panel_icon_get_geometry (int *x, int *y, int *width, int *hei
widget = GTK_WIDGET (applet->w_image);
- gtk_widget_size_request (widget, &requisition);
+ gtk_widget_get_preferred_size (widget, NULL, &requisition);
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]