[Xfce4-commits] <xfce4-panel:nick/desktop-mode> Tasklist: Remove the max-button-size style property.

Nick Schermer noreply at xfce.org
Tue Dec 13 20:32:03 CET 2011


Updating branch refs/heads/nick/desktop-mode
         to 4a5a64dfae51ab486efb545b2260abde1ce76b64 (commit)
       from fc9c34b0b085ca1f08c59002dcafe774500e7a0e (commit)

commit 4a5a64dfae51ab486efb545b2260abde1ce76b64
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Dec 13 19:51:48 2011 +0100

    Tasklist: Remove the max-button-size style property.
    
    This is not used anymore, the tasklist adopts the nrows
    setting of the panel.

 docs/README.gtkrc-2.0              |    5 -----
 plugins/tasklist/tasklist-widget.c |   18 ------------------
 2 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/docs/README.gtkrc-2.0 b/docs/README.gtkrc-2.0
index 17d7276..01716e3 100644
--- a/docs/README.gtkrc-2.0
+++ b/docs/README.gtkrc-2.0
@@ -50,11 +50,6 @@ style "xfce-tasklist-style"
   # entire available space.
   XfceTasklist::max-button-length = 200
 
-  # Maximum size of a button. This is used to detect the number of
-  # rows of the task list plugin. When you increase the value less
-  # rows will be possible.
-  XfceTasklist::max-button-size = 20
-
   # Ellipsizing used in the task list and overflow menu labels.
   XfceTasklist::ellipsize-mode = PANGO_ELLIPSIZE_END
 
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index e5edd1b..8172d01 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -44,7 +44,6 @@
 
 
 
-#define DEFAULT_BUTTON_SIZE          (25)
 #define DEFAULT_MAX_BUTTON_LENGTH    (200)
 #define DEFAULT_MENU_ICON_SIZE       (16)
 #define DEFAULT_MIN_BUTTON_LENGTH    (DEFAULT_MAX_BUTTON_LENGTH / 4)
@@ -187,7 +186,6 @@ struct _XfceTasklist
   /* gtk style properties */
   gint                  max_button_length;
   gint                  min_button_length;
-  gint                  max_button_size;
   PangoEllipsizeMode    ellipsize_mode;
   gint                  minimized_icon_lucency;
   gint                  menu_icon_size;
@@ -477,14 +475,6 @@ xfce_tasklist_class_init (XfceTasklistClass *klass)
                                                              EXO_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (gtkwidget_class,
-                                           g_param_spec_int ("max-button-size",
-                                                             NULL,
-                                                             "The maximum size of a window button",
-                                                             1, G_MAXINT,
-                                                             DEFAULT_BUTTON_SIZE,
-                                                             EXO_PARAM_READABLE));
-
-  gtk_widget_class_install_style_property (gtkwidget_class,
                                            g_param_spec_enum ("ellipsize-mode",
                                                               NULL,
                                                               "The ellipsize mode used for the button label",
@@ -544,7 +534,6 @@ xfce_tasklist_init (XfceTasklist *tasklist)
   tasklist->update_monitor_geometry_id = 0;
   tasklist->max_button_length = DEFAULT_MAX_BUTTON_LENGTH;
   tasklist->min_button_length = DEFAULT_MIN_BUTTON_LENGTH;
-  tasklist->max_button_size = DEFAULT_BUTTON_SIZE;
   tasklist->minimized_icon_lucency = DEFAULT_ICON_LUCENCY;
   tasklist->ellipsize_mode = DEFAULT_ELLIPSIZE_MODE;
   tasklist->grouping = XFCE_TASKLIST_GROUPING_DEFAULT;
@@ -839,10 +828,8 @@ xfce_tasklist_size_layout (XfceTasklist  *tasklist,
 
   /* if we're in deskbar mode, there are no columns */
   if (xfce_tasklist_deskbar (tasklist) && tasklist->show_labels)
-    //rows = tasklist->n_windows;
     rows = 1;
   else
-    /* rows = alloc->height / tasklist->max_button_size; */
     rows = tasklist->nrows;
 
   if (rows < 1)
@@ -1103,7 +1090,6 @@ xfce_tasklist_style_set (GtkWidget *widget,
 {
   XfceTasklist *tasklist = XFCE_TASKLIST (widget);
   gint          max_button_length;
-  gint          max_button_size;
   gint          min_button_length;
   gint          w, h;
 
@@ -1115,7 +1101,6 @@ xfce_tasklist_style_set (GtkWidget *widget,
                         "max-button-length", &max_button_length,
                         "min-button-length", &min_button_length,
                         "ellipsize-mode", &tasklist->ellipsize_mode,
-                        "max-button-size", &max_button_size,
                         "minimized-icon-lucency", &tasklist->minimized_icon_lucency,
                         "menu-max-width-chars", &tasklist->menu_max_width_chars,
                         NULL);
@@ -1125,7 +1110,6 @@ xfce_tasklist_style_set (GtkWidget *widget,
 
   /* update the widget */
   if (tasklist->max_button_length != max_button_length
-      || tasklist->max_button_size != max_button_size
       || tasklist->min_button_length != min_button_length)
     {
       if (max_button_length > 0)
@@ -1140,8 +1124,6 @@ xfce_tasklist_style_set (GtkWidget *widget,
           tasklist->min_button_length = min_button_length;
         }
 
-      tasklist->max_button_size = max_button_size;
-
       gtk_widget_queue_resize (widget);
     }
 }


More information about the Xfce4-commits mailing list