Better patch from raf@noduck.net to fix the activate on the entry dialog.
2003-09-12 Glynn Foster <glynn.foster@sun.com> * src/entry.c, src/zenity.glade: Better patch from raf@noduck.net to fix the activate on the entry dialog.
This commit is contained in:
parent
1fab4b4e62
commit
c14af1c42c
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-12 Glynn Foster <glynn.foster@sun.com>
|
||||||
|
|
||||||
|
* src/entry.c, src/zenity.glade: Better patch from
|
||||||
|
raf@noduck.net to fix the activate on the entry dialog.
|
||||||
|
|
||||||
2003-09-12 Damien Carbery <damien.carbery@sun.com>
|
2003-09-12 Damien Carbery <damien.carbery@sun.com>
|
||||||
|
|
||||||
* src/main.c: Make zenity compile on solaris. Whoops :)
|
* src/main.c: Make zenity compile on solaris. Whoops :)
|
||||||
|
20
src/entry.c
20
src/entry.c
@ -26,7 +26,6 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
static void zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data);
|
static void zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data);
|
||||||
static void zenity_entry_response (GtkWidget *widget, gpointer data);
|
|
||||||
|
|
||||||
static GtkWidget *entry;
|
static GtkWidget *entry;
|
||||||
|
|
||||||
@ -69,9 +68,6 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data)
|
|||||||
|
|
||||||
entry = glade_xml_get_widget (glade_dialog, "zenity_entry_input");
|
entry = glade_xml_get_widget (glade_dialog, "zenity_entry_input");
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (entry), "activate",
|
|
||||||
G_CALLBACK (zenity_entry_response), data);
|
|
||||||
|
|
||||||
if (glade_dialog)
|
if (glade_dialog)
|
||||||
g_object_unref (glade_dialog);
|
g_object_unref (glade_dialog);
|
||||||
|
|
||||||
@ -87,22 +83,6 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data)
|
|||||||
gtk_main ();
|
gtk_main ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
zenity_entry_response (GtkWidget *widget, gpointer data)
|
|
||||||
{
|
|
||||||
ZenityData *zen_data = data;
|
|
||||||
const gchar *text;
|
|
||||||
|
|
||||||
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
|
|
||||||
|
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
|
||||||
|
|
||||||
if (text != NULL)
|
|
||||||
g_print ("%s\n", text);
|
|
||||||
|
|
||||||
gtk_main_quit ();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
|
zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -432,6 +432,7 @@
|
|||||||
<widget class="GtkButton" id="zenity_entry_ok_button">
|
<widget class="GtkButton" id="zenity_entry_ok_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
|
<property name="has_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
@ -496,7 +497,7 @@
|
|||||||
<property name="text" translatable="yes"></property>
|
<property name="text" translatable="yes"></property>
|
||||||
<property name="has_frame">True</property>
|
<property name="has_frame">True</property>
|
||||||
<property name="invisible_char" translatable="yes">*</property>
|
<property name="invisible_char" translatable="yes">*</property>
|
||||||
<property name="activates_default">False</property>
|
<property name="activates_default">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
Reference in New Issue
Block a user