[Xfce4-commits] [apps/xfce4-terminal] 01/01: Replace deprecated gtk_widget_size_request calls
noreply at xfce.org
noreply at xfce.org
Fri Jul 8 21:20:03 CEST 2016
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 87cd5cef84b20fa2f9dd8eeb9f55f39e47f4f0a1
Author: Igor <f2404 at yandex.ru>
Date: Fri Jul 8 22:19:33 2016 +0300
Replace deprecated gtk_widget_size_request calls
---
terminal/terminal-screen.c | 6 +++---
terminal/terminal-window-dropdown.c | 20 ++++++++++----------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index a09b12c..6ab0042 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1754,8 +1754,8 @@ terminal_screen_force_resize_window (TerminalScreen *screen,
glong char_width;
glong char_height;
-#if GTK_CHECK_VERSION (3,20,0)
// Don't need this on gtk>=3.20
+#if GTK_CHECK_VERSION (3,20,0)
return;
#endif
@@ -1765,8 +1765,8 @@ terminal_screen_force_resize_window (TerminalScreen *screen,
terminal_screen_set_window_geometry_hints (screen, window);
- gtk_widget_size_request (GTK_WIDGET (window), &window_requisition);
- gtk_widget_size_request (screen->terminal, &terminal_requisition);
+ gtk_widget_get_preferred_size (GTK_WIDGET (window), &window_requisition, NULL);
+ gtk_widget_get_preferred_size (screen->terminal, &terminal_requisition, NULL);
if (columns < 1)
columns = vte_terminal_get_column_count (VTE_TERMINAL (screen->terminal));
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 224a7eb..557b612 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -578,13 +578,13 @@ terminal_window_dropdown_animate_down (gpointer data)
gint viewport_h;
/* decrease each interval */
- gtk_widget_size_request (window->vbox, &req1);
+ gtk_widget_get_preferred_size (window->vbox, &req1, NULL);
step_size = req1.height * ANIMATION_FPS / dropdown->animation_time;
if (step_size < 1)
step_size = 1;
/* new viewport size */
- gtk_widget_size_request (dropdown->viewport, &req2);
+ gtk_widget_get_preferred_size (dropdown->viewport, &req2, NULL);
viewport_h = req2.height + step_size;
if (viewport_h > req1.height)
viewport_h = req1.height;
@@ -627,7 +627,7 @@ terminal_window_dropdown_animate_up (gpointer data)
}
else
{
- gtk_widget_size_request (TERMINAL_WINDOW (dropdown)->vbox, &req1);
+ gtk_widget_get_preferred_size (TERMINAL_WINDOW (dropdown)->vbox, &req1, NULL);
}
/* decrease each interval */
@@ -636,7 +636,7 @@ terminal_window_dropdown_animate_up (gpointer data)
step_size = 1;
/* new viewport size */
- gtk_widget_size_request (dropdown->viewport, &req2);
+ gtk_widget_get_preferred_size (dropdown->viewport, &req2, NULL);
viewport_h = req2.height - step_size;
if (viewport_h < step_size)
@@ -747,22 +747,22 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
w = monitor_geo.width * dropdown->rel_width;
h = monitor_geo.height * dropdown->rel_height;
- gtk_widget_size_request (window->notebook, &req1);
- gtk_widget_size_request (GTK_WIDGET (window->active), &req2);
+ gtk_widget_get_preferred_size (window->notebook, &req1, NULL);
+ gtk_widget_get_preferred_size (GTK_WIDGET (window->active), &req2, NULL);
xpad += MAX (req1.width - req2.width, 0);
ypad += MAX (req1.height - req2.height, 0);
if (window->menubar != NULL
&& gtk_widget_get_visible (window->menubar))
{
- gtk_widget_size_request (window->menubar, &req2);
+ gtk_widget_get_preferred_size (window->menubar, &req2, NULL);
ypad += req2.height;
}
if (window->toolbar != NULL
&& gtk_widget_get_visible (window->toolbar))
{
- gtk_widget_size_request (window->toolbar, &req2);
+ gtk_widget_get_preferred_size (window->toolbar, &req2, NULL);
ypad += req2.height;
}
@@ -785,7 +785,7 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
else if (old_animation_dir == ANIMATION_DIR_UP)
{
/* pick up where we aborted */
- gtk_widget_size_request (dropdown->viewport, &req1);
+ gtk_widget_get_preferred_size (dropdown->viewport, &req1, NULL);
viewport_h = req1.height;
}
}
@@ -994,7 +994,7 @@ terminal_window_dropdown_get_size (TerminalWindowDropdown *dropdown,
terminal_screen_get_geometry (screen, &char_width, &char_height, &xpad, &ypad);
/* correct padding with visible widgets */
- gtk_widget_size_request (TERMINAL_WINDOW (dropdown)->vbox, &req);
+ gtk_widget_get_preferred_size (TERMINAL_WINDOW (dropdown)->vbox, &req, NULL);
xpad += 2;
ypad += req.height;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list