Browse Source

Patches by Jani Monoses. Use MIN_SIZE and MAX_SIZE defines and set MIN_SIZE to 16.

(Old svn revision: 19431)
upstream/xfce4-panel-4.10.1
Jasper Huijsmans 17 years ago
parent
commit
90d34874fe
  1. 13
      panel/panel-dialogs.c
  2. 2
      panel/panel-private.h
  3. 6
      panel/panel.c

13
panel/panel-dialogs.c

@ -181,6 +181,15 @@ present_dialog (GtkWidget *dialog, GPtrArray *panels)
* ================
*/
static gboolean
item_configure_timeout (XfcePanelItem *item)
{
xfce_panel_item_configure (item);
return FALSE;
}
static gboolean
add_selected_item (PanelItemsDialog *pid)
{
@ -213,7 +222,7 @@ add_selected_item (PanelItemsDialog *pid)
item = panel_add_item (pid->panel, info->name);
}
g_idle_add ((GSourceFunc)xfce_panel_item_configure, item);
g_idle_add ((GSourceFunc)item_configure_timeout, item);
return TRUE;
}
@ -1285,7 +1294,7 @@ add_appearance_options (GtkBox *box, PanelManagerDialog *pmd)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_size_group_add_widget (sg, label);
pmd->size = gtk_hscale_new_with_range (12, 128, 2);
pmd->size = gtk_hscale_new_with_range (MIN_SIZE, MAX_SIZE, 2);
gtk_scale_set_value_pos (GTK_SCALE (pmd->size), GTK_POS_BOTTOM);
gtk_range_set_update_policy (GTK_RANGE (pmd->size), GTK_UPDATE_DELAYED);
gtk_widget_set_size_request (pmd->size, 120, -1);

2
panel/panel-private.h

@ -28,6 +28,8 @@
#include "panel-app.h"
#define DEFAULT_SIZE 48
#define MIN_SIZE 16
#define MAX_SIZE 128
#define DEFAULT_MONITOR 0
#define DEFAULT_SCREEN_POSITION XFCE_SCREEN_POSITION_NONE
#define DEFAULT_XOFFSET 0

6
panel/panel.c

@ -159,7 +159,7 @@ panel_class_init (PanelClass * klass)
pspec = g_param_spec_int ("size",
"Size",
"The size of the panel",
12, 128,
MIN_SIZE, MAX_SIZE,
DEFAULT_SIZE, G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_SIZE, pspec);
@ -360,8 +360,8 @@ panel_size_request (GtkWidget * widget, GtkRequisition * requisition)
{
GTK_WIDGET_CLASS (panel_parent_class)->size_request (widget, requisition);
requisition->width = MAX (12, requisition->width);
requisition->height = MAX (12, requisition->height);
requisition->width = MAX (MIN_SIZE, requisition->width);
requisition->height = MAX (MIN_SIZE, requisition->height);
}
static gboolean

Loading…
Cancel
Save