Beispiel #1
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_radio_tool_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  GtkWidget *combo;

  property_add_stock_item (StockButton, _("Stock Button:"),
			   _("The stock button to use"),
			   GTK_ICON_SIZE_LARGE_TOOLBAR);
  property_add_text (Label, _("Label:"), _("The text to display"), 2);
  property_add_icon (Icon, _("Icon:"),
		     _("The icon to display"),
		     GTK_ICON_SIZE_LARGE_TOOLBAR);

  property_add_combo (Group, _("Group:"),
		      _("The radio tool button group (the default is all radio tool buttons in the toolbar)"),
		      NULL);
  combo = property_get_value_widget (Group);
  gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (combo)->entry), FALSE);

  property_add_bool (Active, _("Initially On:"),
		     _("If the radio button is initially on"));

  property_add_bool (VisibleHorz, _("Show Horizontal:"),
		     _("If the item is visible when the toolbar is horizontal"));
  property_add_bool (VisibleVert, _("Show Vertical:"),
		     _("If the item is visible when the toolbar is vertical"));
  property_add_bool (IsImportant, _("Is Important:"),
		     _("If the item's text should be shown when the toolbar's mode is GTK_TOOLBAR_BOTH_HORIZ"));
}
Beispiel #2
0
/*
 * Creates the child packing properties for children of this widget.
 */
void
gb_paned_create_child_properties (GtkWidget * widget,
				  GbWidgetCreateChildArgData * data)
{
  property_add_bool (Shrink, _("Shrink:"),
		     _("Set True to let the widget shrink"));
  property_add_bool (Resize, _("Resize:"),
		     _("Set True to let the widget resize"));
}
Beispiel #3
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_tool_item_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_bool (VisibleHorz, _("Show Horizontal:"),
		     _("If the item is visible when the toolbar is horizontal"));
  property_add_bool (VisibleVert, _("Show Vertical:"),
		     _("If the item is visible when the toolbar is vertical"));
  property_add_bool (IsImportant, _("Is Important:"),
		     _("If the item's text should be shown when the toolbar's mode is GTK_TOOLBAR_BOTH_HORIZ"));
}
Beispiel #4
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_combo_box_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_text (Items, _("Items:"),
		     _("The items in the combo list, one per line"), 5);

  property_add_bool (AddTearoffs, _("Add Tearoffs:"),
		     _("Whether dropdowns should have a tearoff menu item"));
  property_add_bool (FocusOnClick, _("Focus On Click:"),
		     _("Whether the combo box grabs focus when it is clicked"));
}
Beispiel #5
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_color_picker_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_bool (Dither, _("Dither:"),
		     _("If the sample should use dithering to be more accurate"));
  property_add_bool (UseAlpha, _("Use Alpha:"),
		     _("If the alpha channel should be used"));

  property_add_string (Title, _("Title:"),
		       _("The title of the color selection dialog"));

  property_add_bool (FocusOnClick, _("Focus On Click:"), _("If the button grabs focus when it is clicked"));
}
Beispiel #6
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_combo_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_bool (ValueInList, _("Value In List:"),
		     _("If the value must be in the list"));
  property_add_bool (OKIfEmpty, _("OK If Empty:"),
		     _("If an empty value is acceptable, when 'Value In List' is set"));
  property_add_bool (Case, _("Case Sensitive:"),
		     _("If the searching is case sensitive"));
  property_add_bool (Arrows, _("Use Arrows:"),
		     _("If arrows can be used to change the value"));
  property_add_bool (Always, _("Use Always:"),
		     _("If arrows work even if the value is not in the list"));
  property_add_text (Items, _("Items:"),
		     _("The items in the combo list, one per line"), 5);
}
Beispiel #7
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_dialog_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  gb_window_create_standard_properties (widget, data,
					Title, Type, Position, Modal,
					DefaultWidth, DefaultHeight,
					Shrink, Grow, AutoShrink,
					IconName, FocusOnMap,
					Resizable, DestroyWithParent, Icon,
					Role, TypeHint, SkipTaskbar,
					SkipPager, Decorated, Gravity, Urgency);
  property_add_bool (AutoClose, _("Auto Close:"),
		     _("If the dialog closes when any button is clicked"));
  property_add_bool (HideOnClose, _("Hide on Close:"),
		     _("If the dialog is hidden when it is closed, instead of being destroyed"));
}
Beispiel #8
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_app_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  gb_window_create_standard_properties (widget, data,
					Title, Type, Position, Modal,
					DefaultWidth, DefaultHeight,
					Shrink, Grow, AutoShrink,
					IconName, FocusOnMap,
					Resizable, DestroyWithParent, Icon,
					Role, TypeHint, SkipTaskbar,
					SkipPager, Decorated, Gravity, Urgency);
  property_add_bool (StatusBar, _("Status Bar:"),
		     _("If the window has a status bar"));
  property_add_bool (EnableLayoutConfig, _("Store Config:"),
		     _("If the layout is saved and restored automatically"));
}
Beispiel #9
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_menu_tool_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_stock_item (StockButton, _("Stock Button:"),
			   _("The stock button to use"),
			   GTK_ICON_SIZE_LARGE_TOOLBAR);
  property_add_text (Label, _("Label:"), _("The text to display"), 2);
  property_add_icon (Icon, _("Icon:"),
		     _("The icon to display"),
		     GTK_ICON_SIZE_LARGE_TOOLBAR);
  property_add_bool (VisibleHorz, _("Show Horizontal:"),
		     _("If the item is visible when the toolbar is horizontal"));
  property_add_bool (VisibleVert, _("Show Vertical:"),
		     _("If the item is visible when the toolbar is vertical"));
  property_add_bool (IsImportant, _("Is Important:"),
		     _("If the item's text should be shown when the toolbar's mode is GTK_TOOLBAR_BOTH_HORIZ"));
}
Beispiel #10
0
void
gb_label_create_standard_properties (GtkWidget * widget,
				     GbWidgetCreateArgData * data,
				     const char *label_p,
				     const char *use_underline_p,
				     const char *use_markup_p,
				     const char *justify_p,
				     const char *wrap_p,
				     const char *selectable_p,
				     const char *xalign_p,
				     const char *yalign_p,
				     const char *xpad_p,
				     const char *ypad_p,
				     const char *focus_target_p)
{
  GtkWidget *combo;

  property_add_text (label_p, _("Label:"), _("The text to display"), 2);
  property_add_bool (use_underline_p, _("Use Underline:"),
		     _("If the text includes an underlined accelerator character"));
  property_add_bool (use_markup_p, _("Use Markup:"),
		     _("If the text includes pango markup"));
  property_add_choice (justify_p, _("Justify:"),
		       _("The justification of the lines of the label"),
		       GbJustifyChoices);
  property_add_bool (wrap_p, _("Wrap Text:"),
		     _("If the text is wrapped to fit within the width of the label"));
  property_add_bool (selectable_p, _("Selectable:"),
		     _("If the label text can be selected with the mouse"));
  property_add_float_range (xalign_p, _("X Align:"),
			    _("The horizontal alignment of the entire label"),
			    0, 1, 0.01, 0.1, 0.01, 2);
  property_add_float_range (yalign_p, _("Y Align:"),
			    _("The vertical alignment of the entire label"),
			    0, 1, 0.01, 0.1, 0.01, 2);
  property_add_int_range (xpad_p, _("X Pad:"), _("The horizontal padding"),
			  0, 1000, 1, 10, 1);
  property_add_int_range (ypad_p, _("Y Pad:"), _("The vertical padding"),
			  0, 1000, 1, 10, 1);
  property_add_combo (focus_target_p, _("Focus Target:"),
		      _("The widget to set the keyboard focus to when the underlined accelerator key is used"),
		      NULL);
  combo = property_get_value_widget (focus_target_p);
  gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (combo)->entry), FALSE);
  gtk_combo_set_value_in_list (GTK_COMBO (combo), TRUE, TRUE);
}
Beispiel #11
0
/*
 * Creates the child packing properties for children of this widget.
 */
void
gb_box_create_child_properties (GtkWidget * widget,
				GbWidgetCreateChildArgData * data)
{
  property_add_int_range (GbPosition, _("Position:"),
			  _("The widget's position relative to its siblings"),
			  0, 10000, 1, 10, 1);
  property_add_int_range (GbPadding, _("Padding:"),
			  _("The widget's padding"),
			  0, 10000, 1, 10, 1);
  property_add_bool (GbExpand, _("Expand:"),
		     _("Set True to let the widget expand"));
  property_add_bool (GbFill, _("Fill:"),
		     _("Set True to let the widget fill its allocated area"));
  property_add_bool (GbPack, _("Pack Start:"),
		     _("Set True to pack the widget at the start of the box"));
}
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_file_chooser_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_string (Title, _("Title:"),
		     _("The window title of the file chooser dialog"));
  property_add_choice (Action, _("Action:"),
		       _("The type of file operation being performed"),
		       GbActionChoices);
  property_add_bool (LocalOnly, _("Local Only:"),
		     _("Whether the selected files should be limited to local files"));
  property_add_bool (ShowHidden, _("Show Hidden:"),
		     _("Whether the hidden files and folders should be displayed"));
  property_add_bool (Confirm, _("Confirm:"),
		     _("Whether a confirmation dialog will be displayed if a file will be overwritten"));
  property_add_int_range (WidthChars, _("Width in Chars:"),
			  _("The width of the button in characters"),
			  -1, 1000, 1, 10, 1);
}
Beispiel #13
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_href_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_string (HRefURL, _("URL:"),
		       _("The URL to display when the button is clicked"));
  property_add_text (HRefLabel, _("Label:"),
		     _("The text to display in the button"), 2);
  property_add_bool (FocusOnClick, _("Focus On Click:"), _("If the button grabs focus when it is clicked"));
}
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_radio_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData *
				   data)
{
  property_add_text (Label, _("Label:"), _("The text to display"), 2);
#ifdef USE_GNOME
  gb_button_create_child_icon_property (widget, data, Icon);
#else
  property_add_filename (Icon, _("Icon:"), _("The pixmap filename"));
#endif
  property_add_bool (State, _("Initially On:"),
		     _("If the radio button is initially on"));
  property_add_bool (Indicator, _("Indicator:"),
		     _("If the indicator is always drawn"));
  property_add_combo (Group, _("Group:"),
		      _("The radio button group (the default is all radio buttons with the same parent)"),
		      NULL);
}
Beispiel #15
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_vbox_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_int_range (Size, _("Size:"), _("The number of widgets in the box"),
			  0, 1000, 1, 10, 1);
  property_add_bool (Homogeneous, _("Homogeneous:"),
		     _("If the children should be the same size"));
  property_add_int_range (Spacing, _("Spacing:"), _("The space between each child"),
			  0, 1000, 1, 10, 1);
}
Beispiel #16
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_spin_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData *
				  data)
{
  property_add_float (ClimbRate, _("Climb Rate:"),
		      _("The climb rate of the spinbutton, used in conjunction with the Page Increment"));
  property_add_int_range (Digits, _("Digits:"),
			  _("The number of decimal digits to show"),
			  0, 5, 1, 1, 0);
  property_add_bool (Numeric, _("Numeric:"),
		     _("If only numeric entry is allowed"));
  property_add_choice (Policy, _("Update Policy:"),
		       _("When value_changed signals are emitted"),
		       GbPolicyChoices);
  property_add_bool (Snap, _("Snap:"),
	      _("If the value is snapped to multiples of the step increment"));
  property_add_bool (Wrap, _("Wrap:"),
		     _("If the value is wrapped at the limits"));
  property_add_adjustment (Values, GB_ADJUST_DEFAULT_LABELS);
}
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_message_box_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_choice (MessageBoxType, _("Message Type:"),
		       _("The type of the message box"),
		       GbMessageBoxTypeChoices);
  property_add_text (Message, _("Message:"), _("The message to display"), 4);

  /* We don't allow setting of the title, so we pass NULL here. */
  gb_window_create_standard_properties (widget, data,
					Title, NULL, Position, Modal,
					DefaultWidth, DefaultHeight,
					Shrink, Grow, AutoShrink,
					WMName, WMClass);

  property_add_bool (AutoClose, _("Auto Close:"),
		     _("If the dialog closes when any button is clicked"));
  property_add_bool (HideOnClose, _("Hide on Close:"),
		     _("If the dialog is hidden when it is closed, instead of being destroyed"));
}
Beispiel #18
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_toggle_button_create_properties (GtkWidget * widget, GbWidgetCreateArgData
				    * data)
{
  property_add_stock_item (StockButton, _("Stock Button:"),
			   _("The stock button to use"),
			   GTK_ICON_SIZE_BUTTON);
  property_add_text (Label, _("Label:"), _("The text to display"), 2);
  property_add_icon (Icon, _("Icon:"),
		     _("The icon to display"),
		     GTK_ICON_SIZE_BUTTON);
  property_add_choice (Relief, _("Button Relief:"),
		       _("The relief style of the button"),
		       GladeReliefChoices);

  property_add_bool (State, _("Initially On:"),
		     _("If the toggle button is initially on"));
  property_add_bool (Inconsistent, _("Inconsistent:"),
		     _("If the button is shown in an inconsistent state"));
  property_add_bool (FocusOnClick, _("Focus On Click:"), _("If the button grabs focus when it is clicked"));
}
Beispiel #19
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_bonobo_dock_item_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_bool (Locked, _("Locked:"),
		     _("If the dock item is locked in position"));
  property_add_bool (Exclusive, _("Exclusive:"),
		     _("If the dock item is always the only item in its band"));
  property_add_bool (NeverFloating, _("Never Floating:"),
		     _("If the dock item is never allowed to float in its own window"));
  property_add_bool (NeverVertical, _("Never Vertical:"),
		     _("If the dock item is never allowed to be vertical"));
  property_add_bool (NeverHorizontal, _("Never Horizontal:"),
		     _("If the dock item is never allowed to be horizontal"));

  property_add_choice (ShadowType, _("Shadow:"),
		       _("The type of shadow around the dock item"),
		       GbShadowChoices);
  property_add_choice (Orientation, _("Orientation:"),
		       _("The orientation of a floating dock item"),
		       GladeOrientationChoices);
}
Beispiel #20
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_pixmap_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  property_add_filename (Filename, _("File:"), _("The pixmap filename"));
  property_add_bool (Scaled, _("Scaled:"), _("If the pixmap is scaled"));
  property_add_int_range (Width, _("Scaled Width:"),
			  _("The width to scale the pixmap to"),
			  1, 10000, 1, 10, 1);
  property_add_int_range (Height, _("Scaled Height:"),
			  _("The height to scale the pixmap to"),
			  1, 10000, 1, 10, 1);
}
Beispiel #21
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_bonobo_control_create_properties (GtkWidget * widget, GbWidgetCreateArgData * data)
{
  Bonobo_PropertyBag pb = control_get_pb (widget);
  char *moniker = gtk_object_get_data (GTK_OBJECT (widget), Moniker);
  GList *key_list, *names;

  g_assert (moniker);

  if (!pb)
	  return;

  key_list = bonobo_pbclient_get_keys (pb, NULL);
  for (names = key_list; names; names = names->next) {
    CORBA_TypeCode tc;
    char          *title, *doc;
    char          *prop = create_prop_name (moniker, names->data);

    tc     = bonobo_pbclient_get_type      (pb, names->data, NULL);
    title  = bonobo_pbclient_get_doc_title (pb, names->data, NULL);
    doc    = bonobo_pbclient_get_doc       (pb, names->data, NULL);

    switch (tc->kind) {
    case CORBA_tk_boolean:
      property_add_bool (prop, title, doc);
      break;
    case CORBA_tk_string:
      property_add_string (prop, title, doc);
      break;
    case CORBA_tk_short:
    case CORBA_tk_ushort:
      /* FIXME: _int_range() ? */
      property_add_int (prop, title, doc);
      break;
    case CORBA_tk_double:
    case CORBA_tk_float:
      property_add_float (prop, title, doc);
      break;
    case CORBA_tk_ulong:
    case CORBA_tk_long:
      property_add_int (prop, title, doc);
      break;
    default:
      g_warning ("Unhandled type %d", tc->kind);
      break;
    }
    g_free (prop);
    CORBA_free (title);
    CORBA_free (doc);
  }
  bonobo_pbclient_free_keys (key_list);
}
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_file_selection_create_properties (GtkWidget * widget,
				     GbWidgetCreateArgData * data)
{
  gb_window_create_standard_properties (widget, data,
					Title, Type, Position, Modal,
					DefaultWidth, DefaultHeight,
					Shrink, Grow, AutoShrink,
					WMName, WMClass,
					Resizable, DestroyWithParent, Icon);
  property_add_bool (FileOps, _("File Ops.:"),
		     _("If the file operation buttons are shown"));
}
Beispiel #23
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_tclist_create_properties (GtkWidget * widget, GtkWidget *child, GbWidgetCreateArgData * data)
{
  property_add_choice (Mode, _("Select Mode:"),
		       _("The selection mode of the columned list"),
		       GbModeChoices);
  property_add_bool (Titles, _("Show Titles:"),
		     _("If the column titles are shown"));
  property_add_choice (Shadow, _("Shadow:"),
		       _("The type of shadow of the columned list's border"),
		       GbShadowChoices);
#ifndef GTK_HAVE_FEATURES_1_1_4
  property_add_choice (HPolicy, _("H Policy:"),
		       _("When the horizontal scrollbar will be shown"),
		       GbPolicyChoices);
  property_add_choice (VPolicy, _("V Policy:"),
		       _("When the vertical scrollbar will be shown"),
		       GbPolicyChoices);
#endif
}
Beispiel #24
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_statusbar_create_properties(GtkWidget *widget, GbWidgetCreateArgData *data)
{
  property_add_bool (ResizeGrip, _("Resize Grip:"), _("If the status bar has a resize grip to resize the window"));
}
Beispiel #25
0
/*
 * Creates the components needed to edit the extra properties of this widget.
 */
static void
gb_gnome_druid_create_properties (GtkWidget *widget,
				  GbWidgetCreateArgData *data)
{
  property_add_bool (ShowHelp, _("Show Help"), _("Display the help button."));
}
Beispiel #26
0
void
gb_window_create_standard_properties (GtkWidget * widget,
				      GbWidgetCreateArgData * data,
				      gchar *title_p,
				      gchar *type_p,
				      gchar *position_p,
				      gchar *modal_p,
				      gchar *default_width_p,
				      gchar *default_height_p,
				      gchar *shrink_p,
				      gchar *grow_p,
				      gchar *auto_shrink_p,
				      gchar *wmname_p,
				      gchar *wmclass_p,
				      gchar *resizable_p,
				      gchar *destroy_with_parent_p,
				      gchar *icon_p)
{
  if (title_p)
    property_add_string (title_p, _("Title:"), _("The title of the window"));

  if (type_p)
    property_add_choice (type_p, _("Type:"), _("The type of the window"),
			 GbTypeChoices);

  if (position_p)
    property_add_choice (position_p, _("Position:"),
			 _("The initial position of the window"),
			 GbPositionChoices);

  if (modal_p)
    property_add_bool (modal_p, _("Modal:"), _("If the window is modal"));

  if (default_width_p && default_height_p)
    {
      property_add_optional_int_range (default_width_p,
				       _("Default Width:"),
				       _("The default width of the window"),
				       0, 10000, 1, 10, 1,
				       on_toggle_default_width);
      property_add_optional_int_range (default_height_p,
				       _("Default Height:"),
				       _("The default height of the window"),
				       0, 10000, 1, 10, 1,
				       on_toggle_default_height);
    }

  if (resizable_p)
    property_add_bool (resizable_p, _("Resizable:"),
		       _("If the window can be resized"));

#if 0
  /* These are deprecated. */
  if (shrink_p && grow_p)
    {
      property_add_bool (shrink_p, _("Shrink:"),
			 _("If the window can be shrunk"));
      property_add_bool (grow_p, _("Grow:"),
			 _("If the window can be enlarged"));
    }
#endif

#if 0
  /* These aren't necessary, and have been used incorrectly for ages. */
  if (wmname_p)
    property_add_string (wmname_p, _("WM Name:"),
			 _("The name to pass to the window manager"));
  if (wmclass_p)
    property_add_string (wmclass_p, _("WM Class:"),
			 _("The class name to pass to the window manager"));
#endif

  if (destroy_with_parent_p)
    property_add_bool (destroy_with_parent_p, _("Auto-Destroy:"),
		       _("If the window is destroyed when its transient parent is destroyed"));

  if (icon_p)
    property_add_filename (icon_p, _("Icon:"),
			   _("The icon for this window"));
}