[Xfce4-commits] [xfce/xfdesktop] 03/05: Replace further instances of _get_workarea_single
noreply at xfce.org
noreply at xfce.org
Fri Nov 16 19:12:39 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfdesktop.
commit bcf20152b19d1f6454de9630b6ccb7114ec4be9e
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sat Nov 10 23:23:23 2018 +0100
Replace further instances of _get_workarea_single
---
src/xfdesktop-file-icon-manager.c | 38 ++++++++++++++++++++------------------
src/xfdesktop-icon-view.h | 8 --------
2 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index 2794134..4f5cdfa 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -1902,21 +1902,22 @@ xfdesktop_file_icon_manager_save_icons(gpointer user_data)
XfdesktopFileIconManager *fmanager = XFDESKTOP_FILE_ICON_MANAGER(user_data);
gchar relpath[PATH_MAX], *tmppath, *path;
XfceRc *rcfile;
- gint x = 0, y = 0, width = 0, height = 0;
+ GdkScreen *screen;
+ GdkDisplay *display;
+ GdkMonitor *monitor;
+ GdkRectangle rectangle;
fmanager->priv->save_icons_id = 0;
- xfdesktop_get_workarea_single(fmanager->priv->icon_view,
- 0,
- &x,
- &y,
- &width,
- &height);
+ screen = gtk_widget_get_screen (GTK_WIDGET (fmanager->priv->icon_view));
+ display = gdk_screen_get_display (screen);
+ monitor = gdk_display_get_monitor_at_window (display, gtk_widget_get_parent_window(GTK_WIDGET(fmanager->priv->icon_view)));
+ gdk_monitor_get_workarea (monitor, &rectangle);
g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d-%dx%d.rc",
0,
- width,
- height);
+ rectangle.width,
+ rectangle.height);
path = xfce_resource_save_location(XFCE_RESOURCE_CONFIG, relpath, TRUE);
if(!path)
@@ -2002,22 +2003,23 @@ xfdesktop_file_icon_manager_get_cached_icon_position(XfdesktopFileIconManager *f
gchar relpath[PATH_MAX];
gchar *filename = NULL;
gboolean ret = FALSE;
- gint x = 0, y = 0, width = 0, height = 0;
+ GdkScreen *screen;
+ GdkDisplay *display;
+ GdkMonitor *monitor;
+ GdkRectangle rectangle;
if(!fmanager || !fmanager->priv)
return FALSE;
- xfdesktop_get_workarea_single(fmanager->priv->icon_view,
- 0,
- &x,
- &y,
- &width,
- &height);
+ screen = gtk_widget_get_screen (GTK_WIDGET (fmanager->priv->icon_view));
+ display = gdk_screen_get_display (screen);
+ monitor = gdk_display_get_monitor_at_window (display, gtk_widget_get_parent_window(GTK_WIDGET(fmanager->priv->icon_view)));
+ gdk_monitor_get_workarea (monitor, &rectangle);
g_snprintf(relpath, PATH_MAX, "xfce4/desktop/icons.screen%d-%dx%d.rc",
0,
- width,
- height);
+ rectangle.width,
+ rectangle.height);
filename = xfce_resource_lookup(XFCE_RESOURCE_CONFIG, relpath);
diff --git a/src/xfdesktop-icon-view.h b/src/xfdesktop-icon-view.h
index 97b0d91..8f25cb0 100644
--- a/src/xfdesktop-icon-view.h
+++ b/src/xfdesktop-icon-view.h
@@ -125,14 +125,6 @@ void xfdesktop_icon_view_set_center_text (XfdesktopIconView *icon_view,
GtkWidget *xfdesktop_icon_view_get_window_widget(XfdesktopIconView *icon_view);
-gboolean
-xfdesktop_get_workarea_single(XfdesktopIconView *icon_view,
- guint ws_num,
- gint *xorigin,
- gint *yorigin,
- gint *width,
- gint *height);
-
void xfdesktop_icon_view_sort_icons(XfdesktopIconView *icon_view);
#if defined(DEBUG) && DEBUG > 0
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list