[Xfce4-commits] [xfce/xfdesktop] 01/01: Revert "Add a xfconf settings to center the text on xfdesktop icons."

noreply at xfce.org noreply at xfce.org
Fri Feb 20 17:01:45 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit b6f62ebf9697f11fd0bfae632020365b87d2d037
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Feb 20 18:54:05 2015 +0300

    Revert "Add a xfconf settings to center the text on xfdesktop icons."
    
    This reverts commit 1c5b2b28fa861df3997e7d48ddd7ae8b3cad3a43.
    
    It breaks presentation of icons leaving artifacts on the desktop.
---
 src/xfce-desktop.c        |   41 -----------------------------------------
 src/xfce-desktop.h        |    3 ---
 src/xfdesktop-icon-view.c |   21 ---------------------
 src/xfdesktop-icon-view.h |    2 --
 4 files changed, 67 deletions(-)

diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 483c991..0e10d7a 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -114,7 +114,6 @@ struct _XfceDesktopPriv
     gboolean icons_font_size_set;
     guint icons_font_size;
     guint icons_size;
-    gboolean icons_center_text;
     gint  style_refresh_timer;
     GtkWidget *icon_view;
     gdouble system_font_size;
@@ -136,7 +135,6 @@ enum
     PROP_ICON_SIZE,
     PROP_ICON_FONT_SIZE,
     PROP_ICON_FONT_SIZE_SET,
-    PROP_ICON_CENTER_TEXT,
 #endif
     PROP_SINGLE_WORKSPACE_MODE,
     PROP_SINGLE_WORKSPACE_NUMBER,
@@ -263,9 +261,6 @@ xfce_desktop_setup_icon_view(XfceDesktop *desktop)
             xfdesktop_icon_view_set_icon_size(XFDESKTOP_ICON_VIEW(desktop->priv->icon_view),
                                               desktop->priv->icons_size);
         }
-        xfdesktop_icon_view_set_center_text (XFDESKTOP_ICON_VIEW(desktop->priv->icon_view),
-                                             desktop->priv->icons_center_text);
-
         gtk_widget_show(desktop->priv->icon_view);
         gtk_container_add(GTK_CONTAINER(desktop), desktop->priv->icon_view);
 
@@ -864,13 +859,6 @@ xfce_desktop_class_init(XfceDesktopClass *klass)
                                                          FALSE,
                                                          XFDESKTOP_PARAM_FLAGS));
 
-    g_object_class_install_property(gobject_class, PROP_ICON_CENTER_TEXT,
-                                    g_param_spec_boolean("icon-center-text",
-                                                         "icon center text",
-                                                         "icon center text",
-                                                         TRUE,
-                                                         XFDESKTOP_PARAM_FLAGS));
-
 #endif /* ENABLE_DESKTOP_ICONS */
 
     g_object_class_install_property(gobject_class, PROP_SINGLE_WORKSPACE_MODE,
@@ -951,11 +939,6 @@ xfce_desktop_set_property(GObject *object,
                                                 g_value_get_boolean(value));
             break;
 
-        case PROP_ICON_CENTER_TEXT:
-            xfce_desktop_set_center_text(desktop,
-                                         g_value_get_boolean(value));
-            break;
-
 #endif
         case PROP_SINGLE_WORKSPACE_MODE:
             xfce_desktop_set_single_workspace_mode(desktop,
@@ -999,10 +982,6 @@ xfce_desktop_get_property(GObject *object,
             g_value_set_boolean(value, desktop->priv->icons_font_size_set);
             break;
 
-        case PROP_ICON_CENTER_TEXT:
-            g_value_set_boolean(value, desktop->priv->icons_center_text);
-            break;
-
 #endif
         case PROP_SINGLE_WORKSPACE_MODE:
             g_value_set_boolean(value, desktop->priv->single_workspace_mode);
@@ -1364,9 +1343,6 @@ xfce_desktop_connect_settings(XfceDesktop *desktop)
     xfconf_g_property_bind(channel, ICONS_PREFIX "use-custom-font-size",
                            G_TYPE_BOOLEAN,
                            G_OBJECT(desktop), "icon-font-size-set");
-    xfconf_g_property_bind(channel, ICONS_PREFIX "center-text",
-                           G_TYPE_BOOLEAN,
-                           G_OBJECT(desktop), "icon-center-text");
 
     xfce_desktop_thaw_updates(desktop);
 #undef ICONS_PREFIX
@@ -1611,23 +1587,6 @@ xfce_desktop_set_use_icon_font_size(XfceDesktop *desktop,
 #endif
 }
 
-void
-xfce_desktop_set_center_text (XfceDesktop *desktop,
-                              gboolean center_text)
-{
-    g_return_if_fail(XFCE_IS_DESKTOP(desktop));
-    
-#ifdef ENABLE_DESKTOP_ICONS
-    if(center_text == desktop->priv->icons_center_text)
-        return;
-
-    desktop->priv->icons_center_text = center_text;
-    if(desktop->priv->icon_view) {
-        xfdesktop_icon_view_set_center_text (XFDESKTOP_ICON_VIEW(desktop->priv->icon_view), center_text);
-    }
-#endif
-}
-
 static void
 xfce_desktop_set_single_workspace_mode(XfceDesktop *desktop,
                                        gboolean single_workspace)
diff --git a/src/xfce-desktop.h b/src/xfce-desktop.h
index 640b778..638aa03 100644
--- a/src/xfce-desktop.h
+++ b/src/xfce-desktop.h
@@ -94,9 +94,6 @@ void xfce_desktop_set_use_icon_font_size(XfceDesktop *desktop,
 void xfce_desktop_set_icon_font_size(XfceDesktop *desktop,
                                      guint font_size_points);
 
-void xfce_desktop_set_center_text(XfceDesktop *desktop,
-                                  gboolean center_text);
-
 void xfce_desktop_set_session_logout_func(XfceDesktop *desktop,
                                           SessionLogoutFunc logout_func);
 
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index ce095ac..5f38c21 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -116,7 +116,6 @@ struct _XfdesktopIconViewPrivate
     
     guint icon_size;
     gdouble font_size;
-    gboolean center_text;
     
     WnckScreen *wnck_screen;
     PangoLayout *playout;
@@ -2873,10 +2872,6 @@ xfdesktop_icon_view_setup_pango_layout(XfdesktopIconView *icon_view,
     pango_layout_set_ellipsize(playout, PANGO_ELLIPSIZE_NONE);
     pango_layout_set_wrap(playout, PANGO_WRAP_WORD_CHAR);
     pango_layout_set_width(playout, TEXT_WIDTH * PANGO_SCALE);
-    if (icon_view->priv->center_text)
-        pango_layout_set_alignment(playout, PANGO_ALIGN_CENTER);
-    else
-        pango_layout_set_alignment(playout, PANGO_ALIGN_LEFT);
     pango_layout_set_text(playout, label, -1);
 
     if(!xfdesktop_icon_view_is_icon_selected(icon_view, icon)
@@ -4230,22 +4225,6 @@ xfdesktop_icon_view_get_font_size(XfdesktopIconView *icon_view)
     return icon_view->priv->font_size;
 }
 
-void
-xfdesktop_icon_view_set_center_text (XfdesktopIconView *icon_view,
-                                     gboolean center_text)
-{
-    g_return_if_fail(XFDESKTOP_IS_ICON_VIEW(icon_view));
-    
-    if (center_text == icon_view->priv->center_text)
-        return;
-    
-    icon_view->priv->center_text = center_text;
-    
-    if(gtk_widget_get_realized(GTK_WIDGET(icon_view))) {
-        gtk_widget_queue_draw(GTK_WIDGET(icon_view));
-    }
-}
-
 GtkWidget *
 xfdesktop_icon_view_get_window_widget(XfdesktopIconView *icon_view)
 {
diff --git a/src/xfdesktop-icon-view.h b/src/xfdesktop-icon-view.h
index 41e9d26..ee35b26 100644
--- a/src/xfdesktop-icon-view.h
+++ b/src/xfdesktop-icon-view.h
@@ -117,8 +117,6 @@ guint xfdesktop_icon_view_get_icon_size(XfdesktopIconView *icon_view);
 void xfdesktop_icon_view_set_font_size(XfdesktopIconView *icon_view,
                                        gdouble font_size_points);
 gdouble xfdesktop_icon_view_get_font_size(XfdesktopIconView *icon_view);
-void xfdesktop_icon_view_set_center_text (XfdesktopIconView *icon_view,
-                                          gboolean center_text);
 
 GtkWidget *xfdesktop_icon_view_get_window_widget(XfdesktopIconView *icon_view);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list