mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
Drop the can-default property
It was added at a time when default buttons had a very large external border that would disrupt aligment. Not a problem nowadays.
This commit is contained in:
parent
8880d27460
commit
92e21c3f1c
@ -135,7 +135,6 @@ do_menus (GtkWidget *do_widget)
|
|||||||
g_signal_connect_swapped (button, "clicked",
|
g_signal_connect_swapped (button, "clicked",
|
||||||
G_CALLBACK(gtk_widget_destroy), window);
|
G_CALLBACK(gtk_widget_destroy), window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@ do_password_entry (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_sensitive (button, FALSE);
|
gtk_widget_set_sensitive (button, FALSE);
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||||
|
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ do_tagged_entry (GtkWidget *do_widget)
|
|||||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||||
|
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3176,7 +3176,6 @@ bad things might happen.</property>
|
|||||||
</child>
|
</child>
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="act_action_dialog">
|
<object class="GtkButton" id="act_action_dialog">
|
||||||
<property name="can-default">1</property>
|
|
||||||
<property name="label" translatable="yes">_Act</property>
|
<property name="label" translatable="yes">_Act</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
</object>
|
</object>
|
||||||
@ -3336,7 +3335,6 @@ bad things might happen.</property>
|
|||||||
</child>
|
</child>
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="select_selection_dialog">
|
<object class="GtkButton" id="select_selection_dialog">
|
||||||
<property name="can-default">1</property>
|
|
||||||
<property name="label" translatable="yes">_Select</property>
|
<property name="label" translatable="yes">_Select</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
</object>
|
</object>
|
||||||
@ -3450,7 +3448,6 @@ bad things might happen.</property>
|
|||||||
<property name="label">_Open</property>
|
<property name="label">_Open</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="sensitive">0</property>
|
<property name="sensitive">0</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action"/>
|
||||||
</style>
|
</style>
|
||||||
|
@ -4503,8 +4503,6 @@ gtk_widget_compute_point
|
|||||||
gtk_widget_contains
|
gtk_widget_contains
|
||||||
GtkPickFlags
|
GtkPickFlags
|
||||||
gtk_widget_pick
|
gtk_widget_pick
|
||||||
gtk_widget_get_can_default
|
|
||||||
gtk_widget_set_can_default
|
|
||||||
gtk_widget_get_can_focus
|
gtk_widget_get_can_focus
|
||||||
gtk_widget_set_can_focus
|
gtk_widget_set_can_focus
|
||||||
gtk_widget_get_focus_on_click
|
gtk_widget_get_focus_on_click
|
||||||
|
@ -156,7 +156,6 @@
|
|||||||
* </child>
|
* </child>
|
||||||
* <child type="action">
|
* <child type="action">
|
||||||
* <object class="GtkButton" id="button_ok">
|
* <object class="GtkButton" id="button_ok">
|
||||||
* <property name="can-default">True</property>
|
|
||||||
* </object>
|
* </object>
|
||||||
* </child>
|
* </child>
|
||||||
* <action-widgets>
|
* <action-widgets>
|
||||||
@ -900,8 +899,6 @@ gtk_dialog_add_button (GtkDialog *dialog,
|
|||||||
button = gtk_button_new_with_label (button_text);
|
button = gtk_button_new_with_label (button_text);
|
||||||
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
gtk_dialog_add_action_widget (dialog, button, response_id);
|
gtk_dialog_add_action_widget (dialog, button, response_id);
|
||||||
|
@ -6175,7 +6175,6 @@ add_custom_button_to_dialog (GtkDialog *dialog,
|
|||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
button = gtk_button_new_with_mnemonic (mnemonic_label);
|
button = gtk_button_new_with_mnemonic (mnemonic_label);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
|
|
||||||
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id);
|
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id);
|
||||||
}
|
}
|
||||||
|
@ -576,8 +576,6 @@ gtk_info_bar_add_button (GtkInfoBar *info_bar,
|
|||||||
button = gtk_button_new_with_label (button_text);
|
button = gtk_button_new_with_label (button_text);
|
||||||
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
|
||||||
|
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
|
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
gtk_info_bar_add_action_widget (info_bar, button, response_id);
|
gtk_info_bar_add_action_widget (info_bar, button, response_id);
|
||||||
|
@ -2688,7 +2688,6 @@ create_rename_popover (GtkPlacesSidebar *sidebar)
|
|||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
button = gtk_button_new_with_mnemonic (_("_Rename"));
|
button = gtk_button_new_with_mnemonic (_("_Rename"));
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
|
gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (do_rename), sidebar);
|
g_signal_connect (button, "clicked", G_CALLBACK (do_rename), sidebar);
|
||||||
error = gtk_label_new ("");
|
error = gtk_label_new ("");
|
||||||
|
@ -2429,7 +2429,6 @@ gtk_popover_set_default_widget (GtkPopover *popover,
|
|||||||
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_POPOVER (popover));
|
g_return_if_fail (GTK_IS_POPOVER (popover));
|
||||||
g_return_if_fail (widget == NULL || gtk_widget_get_can_default (widget));
|
|
||||||
|
|
||||||
if (priv->default_widget == widget)
|
if (priv->default_widget == widget)
|
||||||
return;
|
return;
|
||||||
|
@ -548,7 +548,6 @@ enum {
|
|||||||
PROP_IS_FOCUS,
|
PROP_IS_FOCUS,
|
||||||
PROP_CAN_TARGET,
|
PROP_CAN_TARGET,
|
||||||
PROP_FOCUS_ON_CLICK,
|
PROP_FOCUS_ON_CLICK,
|
||||||
PROP_CAN_DEFAULT,
|
|
||||||
PROP_HAS_DEFAULT,
|
PROP_HAS_DEFAULT,
|
||||||
PROP_RECEIVES_DEFAULT,
|
PROP_RECEIVES_DEFAULT,
|
||||||
PROP_CURSOR,
|
PROP_CURSOR,
|
||||||
@ -1033,13 +1032,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
|||||||
TRUE,
|
TRUE,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
widget_props[PROP_CAN_DEFAULT] =
|
|
||||||
g_param_spec_boolean ("can-default",
|
|
||||||
P_("Can default"),
|
|
||||||
P_("Whether the widget can be the default widget"),
|
|
||||||
FALSE,
|
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
|
||||||
|
|
||||||
widget_props[PROP_HAS_DEFAULT] =
|
widget_props[PROP_HAS_DEFAULT] =
|
||||||
g_param_spec_boolean ("has-default",
|
g_param_spec_boolean ("has-default",
|
||||||
P_("Has default"),
|
P_("Has default"),
|
||||||
@ -2190,9 +2182,6 @@ gtk_widget_set_property (GObject *object,
|
|||||||
case PROP_FOCUS_ON_CLICK:
|
case PROP_FOCUS_ON_CLICK:
|
||||||
gtk_widget_set_focus_on_click (widget, g_value_get_boolean (value));
|
gtk_widget_set_focus_on_click (widget, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
case PROP_CAN_DEFAULT:
|
|
||||||
gtk_widget_set_can_default (widget, g_value_get_boolean (value));
|
|
||||||
break;
|
|
||||||
case PROP_RECEIVES_DEFAULT:
|
case PROP_RECEIVES_DEFAULT:
|
||||||
gtk_widget_set_receives_default (widget, g_value_get_boolean (value));
|
gtk_widget_set_receives_default (widget, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
@ -2367,9 +2356,6 @@ gtk_widget_get_property (GObject *object,
|
|||||||
case PROP_FOCUS_ON_CLICK:
|
case PROP_FOCUS_ON_CLICK:
|
||||||
g_value_set_boolean (value, gtk_widget_get_focus_on_click (widget));
|
g_value_set_boolean (value, gtk_widget_get_focus_on_click (widget));
|
||||||
break;
|
break;
|
||||||
case PROP_CAN_DEFAULT:
|
|
||||||
g_value_set_boolean (value, gtk_widget_get_can_default (widget));
|
|
||||||
break;
|
|
||||||
case PROP_HAS_DEFAULT:
|
case PROP_HAS_DEFAULT:
|
||||||
g_value_set_boolean (value, gtk_widget_has_default (widget));
|
g_value_set_boolean (value, gtk_widget_has_default (widget));
|
||||||
break;
|
break;
|
||||||
@ -5811,63 +5797,12 @@ gtk_widget_get_focus_on_click (GtkWidget *widget)
|
|||||||
return priv->focus_on_click;
|
return priv->focus_on_click;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_set_can_default:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
* @can_default: whether or not @widget can be a default widget.
|
|
||||||
*
|
|
||||||
* Specifies whether @widget can be a default widget.
|
|
||||||
*
|
|
||||||
* The default widget is activated when the user presses
|
|
||||||
* Enter in a window. Default widgets must be activatable,
|
|
||||||
* that is, gtk_widget_activate() should affect them. Note
|
|
||||||
* that #GtkEntry widgets require the “activates-default”
|
|
||||||
* property set to %TRUE before they activate the default
|
|
||||||
* widget when Enter is pressed and the #GtkEntry is focused.
|
|
||||||
**/
|
|
||||||
void
|
|
||||||
gtk_widget_set_can_default (GtkWidget *widget,
|
|
||||||
gboolean can_default)
|
|
||||||
{
|
|
||||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
if (priv->can_default != can_default)
|
|
||||||
{
|
|
||||||
priv->can_default = can_default;
|
|
||||||
|
|
||||||
gtk_widget_queue_resize (widget);
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_CAN_DEFAULT]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_widget_get_can_default:
|
|
||||||
* @widget: a #GtkWidget
|
|
||||||
*
|
|
||||||
* Determines whether @widget can be a default widget. See
|
|
||||||
* gtk_widget_set_can_default().
|
|
||||||
*
|
|
||||||
* Returns: %TRUE if @widget can be a default widget, %FALSE otherwise
|
|
||||||
**/
|
|
||||||
gboolean
|
|
||||||
gtk_widget_get_can_default (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
|
|
||||||
|
|
||||||
return priv->can_default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_widget_has_default:
|
* gtk_widget_has_default:
|
||||||
* @widget: a #GtkWidget
|
* @widget: a #GtkWidget
|
||||||
*
|
*
|
||||||
* Determines whether @widget is the current default widget within its
|
* Determines whether @widget is the current default widget within its
|
||||||
* toplevel. See gtk_widget_set_can_default().
|
* toplevel.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if @widget is the current default widget within
|
* Returns: %TRUE if @widget is the current default widget within
|
||||||
* its toplevel, %FALSE otherwise
|
* its toplevel, %FALSE otherwise
|
||||||
@ -5907,9 +5842,6 @@ _gtk_widget_set_has_default (GtkWidget *widget,
|
|||||||
* Specifies whether @widget will be treated as the default
|
* Specifies whether @widget will be treated as the default
|
||||||
* widget within its toplevel when it has the focus, even if
|
* widget within its toplevel when it has the focus, even if
|
||||||
* another widget is the default.
|
* another widget is the default.
|
||||||
*
|
|
||||||
* See gtk_widget_set_can_default() for details about the
|
|
||||||
* meaning of “default”.
|
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_widget_set_receives_default (GtkWidget *widget,
|
gtk_widget_set_receives_default (GtkWidget *widget,
|
||||||
|
@ -474,12 +474,6 @@ void gtk_widget_set_can_target (GtkWidget *widget,
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_widget_get_can_target (GtkWidget *widget);
|
gboolean gtk_widget_get_can_target (GtkWidget *widget);
|
||||||
|
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
void gtk_widget_set_can_default (GtkWidget *widget,
|
|
||||||
gboolean can_default);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
gboolean gtk_widget_get_can_default (GtkWidget *widget);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_widget_has_default (GtkWidget *widget);
|
gboolean gtk_widget_has_default (GtkWidget *widget);
|
||||||
|
|
||||||
|
@ -81,7 +81,6 @@ struct _GtkWidgetPrivate
|
|||||||
guint can_focus : 1;
|
guint can_focus : 1;
|
||||||
guint has_focus : 1;
|
guint has_focus : 1;
|
||||||
guint focus_on_click : 1;
|
guint focus_on_click : 1;
|
||||||
guint can_default : 1;
|
|
||||||
guint has_default : 1;
|
guint has_default : 1;
|
||||||
guint receives_default : 1;
|
guint receives_default : 1;
|
||||||
guint has_grab : 1;
|
guint has_grab : 1;
|
||||||
|
@ -2563,9 +2563,7 @@ gtk_window_set_startup_id (GtkWindow *window,
|
|||||||
*
|
*
|
||||||
* The default widget is the widget that’s activated when the user
|
* The default widget is the widget that’s activated when the user
|
||||||
* presses Enter in a dialog (for example). This function sets or
|
* presses Enter in a dialog (for example). This function sets or
|
||||||
* unsets the default widget for a #GtkWindow. Before making a widget
|
* unsets the default widget for a #GtkWindow.
|
||||||
* the default widget, you must call gtk_widget_set_can_default() on
|
|
||||||
* the widget you’d like to make the default.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_window_set_default_widget (GtkWindow *window,
|
gtk_window_set_default_widget (GtkWindow *window,
|
||||||
@ -2575,9 +2573,6 @@ gtk_window_set_default_widget (GtkWindow *window,
|
|||||||
|
|
||||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||||
|
|
||||||
if (default_widget)
|
|
||||||
g_return_if_fail (gtk_widget_get_can_default (default_widget));
|
|
||||||
|
|
||||||
if (priv->default_widget != default_widget)
|
if (priv->default_widget != default_widget)
|
||||||
{
|
{
|
||||||
GtkWidget *old_default_widget = NULL;
|
GtkWidget *old_default_widget = NULL;
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
<object class="GtkButton" id="ok_button">
|
<object class="GtkButton" id="ok_button">
|
||||||
<property name="label" translatable="yes">_Select</property>
|
<property name="label" translatable="yes">_Select</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
<property name="visible">0</property>
|
<property name="visible">0</property>
|
||||||
<property name="label" translatable="yes">_Close</property>
|
<property name="label" translatable="yes">_Close</property>
|
||||||
<property name="can-focus">1</property>
|
<property name="can-focus">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<property name="receives-default">1</property>
|
<property name="receives-default">1</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<style>
|
<style>
|
||||||
@ -87,7 +86,6 @@
|
|||||||
<object class="GtkButton" id="forward">
|
<object class="GtkButton" id="forward">
|
||||||
<property name="label" translatable="yes">_Next</property>
|
<property name="label" translatable="yes">_Next</property>
|
||||||
<property name="can-focus">1</property>
|
<property name="can-focus">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<property name="receives-default">1</property>
|
<property name="receives-default">1</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<style>
|
<style>
|
||||||
@ -101,7 +99,6 @@
|
|||||||
<property name="visible">0</property>
|
<property name="visible">0</property>
|
||||||
<property name="label" translatable="yes">_Apply</property>
|
<property name="label" translatable="yes">_Apply</property>
|
||||||
<property name="can-focus">1</property>
|
<property name="can-focus">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<property name="receives-default">1</property>
|
<property name="receives-default">1</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<style>
|
<style>
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
<object class="GtkButton" id="ok_button">
|
<object class="GtkButton" id="ok_button">
|
||||||
<property name="label" translatable="yes">_Select</property>
|
<property name="label" translatable="yes">_Select</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -412,7 +412,6 @@
|
|||||||
<property name="sensitive">0</property>
|
<property name="sensitive">0</property>
|
||||||
<property name="label" translatable="yes">_Create</property>
|
<property name="label" translatable="yes">_Create</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<signal name="clicked" handler="new_folder_create_clicked"/>
|
<signal name="clicked" handler="new_folder_create_clicked"/>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action"/>
|
||||||
@ -471,7 +470,6 @@
|
|||||||
<property name="sensitive">0</property>
|
<property name="sensitive">0</property>
|
||||||
<property name="label" translatable="yes">_Rename</property>
|
<property name="label" translatable="yes">_Rename</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
<signal name="clicked" handler="rename_file_rename_clicked"/>
|
<signal name="clicked" handler="rename_file_rename_clicked"/>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action"/>
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
<object class="GtkButton" id="select_button">
|
<object class="GtkButton" id="select_button">
|
||||||
<property name="label" translatable="yes">_Select</property>
|
<property name="label" translatable="yes">_Select</property>
|
||||||
<property name="use-underline">1</property>
|
<property name="use-underline">1</property>
|
||||||
<property name="can-default">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
<object class="GtkButton" id="confirm_button">
|
<object class="GtkButton" id="confirm_button">
|
||||||
<property name="label" translatable="yes">_Join</property>
|
<property name="label" translatable="yes">_Join</property>
|
||||||
<property name="can_focus">1</property>
|
<property name="can_focus">1</property>
|
||||||
<property name="can_default">1</property>
|
|
||||||
<property name="has_default">1</property>
|
<property name="has_default">1</property>
|
||||||
<property name="receives_default">1</property>
|
<property name="receives_default">1</property>
|
||||||
<property name="use_underline">1</property>
|
<property name="use_underline">1</property>
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label">_Go</property>
|
<property name="label">_Go</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="can_default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -680,7 +680,6 @@ create_calendar(void)
|
|||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 0);
|
gtk_window_set_default_size (GTK_WINDOW (window), 600, 0);
|
||||||
|
@ -317,7 +317,6 @@ create_buttons (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button[9]);
|
gtk_container_add (GTK_CONTAINER (box2), button[9]);
|
||||||
gtk_widget_set_can_default (button[9], TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button[9]);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button[9]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +377,6 @@ create_toggle_buttons (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -787,7 +785,6 @@ create_statusbar (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1282,7 +1279,6 @@ create_pixbuf (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1372,7 +1368,6 @@ create_tooltips (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
|
|
||||||
gtk_widget_set_tooltip_text (button, "Push this button to close window");
|
gtk_widget_set_tooltip_text (button, "Push this button to close window");
|
||||||
@ -1806,7 +1801,6 @@ create_menus (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
}
|
}
|
||||||
@ -2409,7 +2403,6 @@ create_entry (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3925,7 +3918,6 @@ create_range_controls (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
}
|
}
|
||||||
@ -4303,7 +4295,6 @@ create_notebook (GtkWidget *widget)
|
|||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box1), button);
|
gtk_container_add (GTK_CONTAINER (box1), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4928,7 +4919,6 @@ create_wmhints (GtkWidget *widget)
|
|||||||
window);
|
window);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
}
|
}
|
||||||
@ -5914,7 +5904,6 @@ create_timeout_test (GtkWidget *widget)
|
|||||||
g_signal_connect_swapped (button, "clicked",
|
g_signal_connect_swapped (button, "clicked",
|
||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
window);
|
window);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_container_add (GTK_CONTAINER (action_area), button);
|
gtk_container_add (GTK_CONTAINER (action_area), button);
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
@ -5923,7 +5912,6 @@ create_timeout_test (GtkWidget *widget)
|
|||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK(start_timeout_test),
|
G_CALLBACK(start_timeout_test),
|
||||||
label);
|
label);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_container_add (GTK_CONTAINER (action_area), button);
|
gtk_container_add (GTK_CONTAINER (action_area), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
@ -5931,7 +5919,6 @@ create_timeout_test (GtkWidget *widget)
|
|||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (stop_timeout_test),
|
G_CALLBACK (stop_timeout_test),
|
||||||
NULL);
|
NULL);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_container_add (GTK_CONTAINER (action_area), button);
|
gtk_container_add (GTK_CONTAINER (action_area), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
}
|
}
|
||||||
@ -6510,7 +6497,6 @@ create_main_window (void)
|
|||||||
G_CALLBACK (do_exit),
|
G_CALLBACK (do_exit),
|
||||||
window);
|
window);
|
||||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
|
||||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||||
|
|
||||||
gtk_widget_show (window);
|
gtk_widget_show (window);
|
||||||
|
@ -1468,7 +1468,6 @@ test_widget (void)
|
|||||||
" <object class=\"GtkWindow\" id=\"window1\">"
|
" <object class=\"GtkWindow\" id=\"window1\">"
|
||||||
" <child>"
|
" <child>"
|
||||||
" <object class=\"GtkButton\" id=\"button1\">"
|
" <object class=\"GtkButton\" id=\"button1\">"
|
||||||
" <property name=\"can-default\">True</property>"
|
|
||||||
" <property name=\"has-default\">True</property>"
|
" <property name=\"has-default\">True</property>"
|
||||||
" </object>"
|
" </object>"
|
||||||
" </child>"
|
" </child>"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
</child>
|
</child>
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<object class="GtkDialog">
|
<object class="GtkDialog">
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<object class="GtkDialog">
|
<object class="GtkDialog">
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<object class="GtkDialog">
|
<object class="GtkDialog">
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<object class="GtkDialog">
|
<object class="GtkDialog">
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<object class="GtkDialog">
|
<object class="GtkDialog">
|
||||||
<child type="action">
|
<child type="action">
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can_default">1</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_ok">
|
<object class="GtkButton" id="button_ok">
|
||||||
<property name="can-default">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
Loading…
Reference in New Issue
Block a user