From 7a96008267eb2128beeb250f0ffe8f6e26749781 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Tue, 16 Mar 1999 20:08:35 +0000 Subject: [PATCH] 1999-03-16 Federico Mena Quintero * gdesktop.c (icon_event): I'm an idiot. Someone teach me boolean logic again. Fixed edit-on-release for icons. --- gnome/ChangeLog | 5 +++++ gnome/gdesktop.c | 2 +- gnome/gdialogs.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 5e4cca799..45002ce18 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +1999-03-16 Federico Mena Quintero + + * gdesktop.c (icon_event): I'm an idiot. Someone teach me boolean + logic again. Fixed edit-on-release for icons. + 1999-03-15 Federico Mena Quintero * gdialogs.c (real_input_dialog_help): Now we use a diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index f131b8bfa..b695a97e6 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -1531,7 +1531,7 @@ icon_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data) break; case GDK_BUTTON_RELEASE: - if (event->button.button != 1 || event->button.button != 2) + if (!(event->button.button == 1 || event->button.button != 2)) break; if (on_text && icon_select_on_text) { diff --git a/gnome/gdialogs.c b/gnome/gdialogs.c index 06d7a6da1..5fbdeeb49 100644 --- a/gnome/gdialogs.c +++ b/gnome/gdialogs.c @@ -968,3 +968,51 @@ real_input_dialog_help (char *header, char *text, char *help, char *def_text) gtk_main (); return string; } + +/* Our implementation of the symlink-to dialog */ +void +symlink_dialog (char *existing, char *new, char **ret_existing, char **ret_new) +{ + GtkWidget *dialog; + GtkWidget *vbox; + GtkWidget *entry1, *entry2; + int ret; + + dialog = gnome_dialog_new (_("Symbolic Link"), + GNOME_STOCK_BUTTON_OK, + GNOME_STOCK_BUTTON_CANCEL); + gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); + + /* File symlink will point to */ + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), vbox, FALSE, FALSE, 0); + + gtk_box_pack_start (GTK_BOX (vbox), + gtk_label_new (_("File symlink will point to:")), + FALSE, FALSE, 0); + + entry1 = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (entry1), existing); + gtk_box_pack_start (GTK_BOX (vbox), entry1, FALSE, FALSE, 0); + + /* Name of symlink */ + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), vbox, FALSE, FALSE, 0); + + gtk_box_pack_start (GTK_BOX (vbox), + gtk_label_new (_("Symlink name:")), + FALSE, FALSE, 0); + + entry2 = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (entry2), new); + gtk_box_pack_start (GTK_BOX (vbox), entry2, FALSE, FALSE, 0); + + /* Run */ + + ret = gnome_dialog_run (GNOME_DIALOG (dialog)); + + + +}