Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47417 - in /trunk/gtk: ChangeLog src/YGInputField.cc src/ygtkfieldentry.c src/ygtkfieldentry.h
  • From: michael_meeks@xxxxxxxxxxxxxxxx
  • Date: Fri, 09 May 2008 14:33:05 -0000
  • Message-id: <20080509143305.8FCBF2DE97@xxxxxxxxxxxxxxxx>
Author: michael_meeks
Date: Fri May 9 16:33:05 2008
New Revision: 47417

URL: http://svn.opensuse.org/viewcvs/yast?rev=47417&view=rev
Log:
2008-05-09 Michael Meeks <michael.meeks@xxxxxxxxxx>

* src/ygtkfieldentry.c (ygtk_field_entry_set_focus),
* src/YGInputField.cc (doSetKeyboardFocus): set focus correctly
on YInputFields #388718#


Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGInputField.cc
trunk/gtk/src/ygtkfieldentry.c
trunk/gtk/src/ygtkfieldentry.h

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=47417&r1=47416&r2=47417&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Fri May 9 16:33:05 2008
@@ -1,3 +1,9 @@
+2008-05-09 Michael Meeks <michael.meeks@xxxxxxxxxx>
+
+ * src/ygtkfieldentry.c (ygtk_field_entry_set_focus),
+ * src/YGInputField.cc (doSetKeyboardFocus): set focus correctly
+ on YInputFields #388718#
+
2008-05-08 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/YGPackageSelector.cc: fixed bug 386536: be more strict in the

Modified: trunk/gtk/src/YGInputField.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGInputField.cc?rev=47417&r1=47416&r2=47417&view=diff
==============================================================================
--- trunk/gtk/src/YGInputField.cc (original)
+++ trunk/gtk/src/YGInputField.cc Fri May 9 16:33:05 2008
@@ -65,6 +65,12 @@
pThis->emitEvent (YEvent::ValueChanged);
}

+ virtual bool doSetKeyboardFocus()
+ {
+ YGtkFieldEntry *field = YGTK_FIELD_ENTRY (getWidget());
+ return ygtk_field_entry_set_focus (field);
+ }
+
YGWIDGET_IMPL_COMMON
YGLABEL_WIDGET_IMPL_SET_LABEL_CHAIN (YInputField)
};

Modified: trunk/gtk/src/ygtkfieldentry.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkfieldentry.c?rev=47417&r1=47416&r2=47417&view=diff
==============================================================================
--- trunk/gtk/src/ygtkfieldentry.c (original)
+++ trunk/gtk/src/ygtkfieldentry.c Fri May 9 16:33:05 2008
@@ -23,7 +23,8 @@
}

static GtkEntry *ygtk_field_entry_focus_next_entry (YGtkFieldEntry *fields,
- GtkEntry *current_entry, gint side)
+ GtkEntry *current_entry,
+ gint side)
{
GList *children = gtk_container_get_children (GTK_CONTAINER (fields));
gint pos = g_list_index (children, current_entry);
@@ -188,3 +189,12 @@
NULL, NULL, gtk_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
}

+gboolean ygtk_field_entry_set_focus (YGtkFieldEntry *fields)
+{
+ GList *children = gtk_container_get_children (GTK_CONTAINER (fields));
+ g_return_val_if_fail (children != NULL, FALSE);
+ GtkWidget *widget = GTK_WIDGET (children->data);
+
+ gtk_widget_grab_focus (widget);
+ return gtk_widget_is_focus (widget);
+}

Modified: trunk/gtk/src/ygtkfieldentry.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkfieldentry.h?rev=47417&r1=47416&r2=47417&view=diff
==============================================================================
--- trunk/gtk/src/ygtkfieldentry.h (original)
+++ trunk/gtk/src/ygtkfieldentry.h Fri May 9 16:33:05 2008
@@ -40,19 +40,21 @@
void (* filter_entry_changed) (YGtkFieldEntry *entry, gint field_nb);
} YGtkFieldEntryClass;

-GtkWidget* ygtk_field_entry_new (void);
-GType ygtk_field_entry_get_type (void) G_GNUC_CONST;
+GtkWidget* ygtk_field_entry_new (void);
+GType ygtk_field_entry_get_type (void) G_GNUC_CONST;

// if this is the first field, separator will be ignored.
-guint ygtk_field_entry_add_field (YGtkFieldEntry *entry, gchar separator);
-//max_length can be 0 to disable it. valids_chars can be NULL to disable it.
-void ygtk_field_entry_setup_field (YGtkFieldEntry *entry, guint index,
- gint max_length, const gchar *valid_chars);
+guint ygtk_field_entry_add_field (YGtkFieldEntry *entry, gchar
separator);
+// max_length can be 0 to disable it. valids_chars can be NULL to disable it.
+void ygtk_field_entry_setup_field (YGtkFieldEntry *entry, guint
index,
+ gint max_length, const gchar
*valid_chars);
+
+const gchar *ygtk_field_entry_get_field_text (YGtkFieldEntry *entry, guint
index);
+void ygtk_field_entry_set_field_text (YGtkFieldEntry *entry, guint
index,
+ const gchar *text);

-void ygtk_field_entry_set_field_text (YGtkFieldEntry *entry, guint index,
const gchar *text);
-const gchar *ygtk_field_entry_get_field_text (YGtkFieldEntry *entry, guint
index);
-
-GtkEntry *ygtk_field_entry_get_field_widget (YGtkFieldEntry *entry, guint
index);
+GtkEntry *ygtk_field_entry_get_field_widget (YGtkFieldEntry *entry, guint
index);
+gboolean ygtk_field_entry_set_focus (YGtkFieldEntry *entry);

G_END_DECLS
#endif /*YGTK_FIELD_ENTRY_H*/

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages