mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 04:22:29 +00:00
don't use gimp_dialog_set_sensitive(); just make the entry not editable
2006-11-14 Sven Neumann <sven@gimp.org> * app/dialogs/file-open-location-dialog.c: don't use gimp_dialog_set_sensitive(); just make the entry not editable and the dialog's OK button insensitive. * app/widgets/gimpfiledialog.c * app/widgets/gimpwidgets-utils.[ch]: moved gimp_dialog_set_sensitive() implementation into gimp_file_dialog_set_sensitive().
This commit is contained in:
parent
d0da897849
commit
da2253fce0
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-11-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/dialogs/file-open-location-dialog.c: don't use
|
||||
gimp_dialog_set_sensitive(); just make the entry not editable and
|
||||
the dialog's OK button insensitive.
|
||||
|
||||
* app/widgets/gimpfiledialog.c
|
||||
* app/widgets/gimpwidgets-utils.[ch]: moved gimp_dialog_set_sensitive()
|
||||
implementation into gimp_file_dialog_set_sensitive().
|
||||
|
||||
2006-11-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimprectangletool.c: reduced the size of the side
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "widgets/gimpcontainerentry.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpprogressbox.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "file-open-location-dialog.h"
|
||||
|
||||
|
@ -162,10 +161,11 @@ file_open_location_response (GtkDialog *dialog,
|
|||
return;
|
||||
}
|
||||
|
||||
gimp_dialog_set_sensitive (dialog, FALSE);
|
||||
|
||||
entry = g_object_get_data (G_OBJECT (dialog), "location-entry");
|
||||
|
||||
gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
|
||||
if (text && strlen (text))
|
||||
|
@ -229,7 +229,9 @@ file_open_location_response (GtkDialog *dialog,
|
|||
text, error->message);
|
||||
g_clear_error (&error);
|
||||
|
||||
gimp_dialog_set_sensitive (dialog, TRUE);
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
|
||||
gtk_editable_set_editable (GTK_EDITABLE (entry), TRUE);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "gimpview.h"
|
||||
#include "gimpviewrendererimagefile.h"
|
||||
#include "gimpthumbbox.h"
|
||||
#include "gimpwidgets-utils.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -348,9 +347,31 @@ void
|
|||
gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
|
||||
gboolean sensitive)
|
||||
{
|
||||
GList *children;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
|
||||
|
||||
gimp_dialog_set_sensitive (GTK_DIALOG (dialog), sensitive);
|
||||
children =
|
||||
gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox));
|
||||
|
||||
for (list = children; list; list = g_list_next (list))
|
||||
{
|
||||
/* skip the last item (the action area) */
|
||||
if (! g_list_next (list))
|
||||
break;
|
||||
|
||||
gtk_widget_set_sensitive (list->data, sensitive);
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
if (sensitive)
|
||||
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_CANCEL, sensitive);
|
||||
|
||||
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK, sensitive);
|
||||
|
||||
dialog->busy = ! sensitive;
|
||||
dialog->canceled = FALSE;
|
||||
|
|
|
@ -885,34 +885,6 @@ gimp_window_set_transient_for (GtkWindow *window,
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_set_sensitive (GtkDialog *dialog,
|
||||
gboolean sensitive)
|
||||
{
|
||||
GList *children;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_DIALOG (dialog));
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (dialog->vbox));
|
||||
|
||||
for (list = children; list; list = g_list_next (list))
|
||||
{
|
||||
/* skip the last item (the action area) */
|
||||
if (! g_list_next (list))
|
||||
break;
|
||||
|
||||
gtk_widget_set_sensitive (list->data, sensitive);
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
if (sensitive)
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_CANCEL, sensitive);
|
||||
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, sensitive);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_text_buffer_load (GtkTextBuffer *buffer,
|
||||
const gchar *filename,
|
||||
|
|
|
@ -76,9 +76,6 @@ GdkNativeWindow gimp_window_get_native (GtkWindow *window);
|
|||
void gimp_window_set_transient_for (GtkWindow *window,
|
||||
guint32 parent_ID);
|
||||
|
||||
void gimp_dialog_set_sensitive (GtkDialog *dialog,
|
||||
gboolean sensitive);
|
||||
|
||||
gboolean gimp_text_buffer_load (GtkTextBuffer *buffer,
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
|
|
Loading…
Reference in a new issue