mirror of https://github.com/GNOME/gimp.git
allow to configure whether tips are shown on startup.
2002-11-22 Sven Neumann <sven@gimp.org> * app/gui/preferences-dialog.c: allow to configure whether tips are shown on startup. * app/gui/tips-dialog.c: threw out lots of code and use gimp_prop_check_button_new() instead.
This commit is contained in:
parent
7ed530d040
commit
ac940f2cff
|
@ -1,3 +1,11 @@
|
|||
2002-11-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/preferences-dialog.c: allow to configure whether tips
|
||||
are shown on startup.
|
||||
|
||||
* app/gui/tips-dialog.c: threw out lots of code and use
|
||||
gimp_prop_check_button_new() instead.
|
||||
|
||||
2002-11-21 Maurits Rijk <lpeek.mrijk@consunet.nl>
|
||||
|
||||
* plug-ins/common/blinds.c: use gimp_get_bg_guchar
|
||||
|
|
|
@ -1253,6 +1253,9 @@ prefs_dialog_new (Gimp *gimp,
|
|||
prefs_check_button_add (config, "use-help",
|
||||
_("Context Sensitive _Help with \"F1\""),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-tips",
|
||||
_("Show Tips on _Startup"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
vbox2 = prefs_frame_new (_("Help Browser"), GTK_CONTAINER (vbox));
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimppropwidgets.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
#include "tips-parser.h"
|
||||
|
||||
|
@ -47,8 +49,6 @@ static void tips_show_previous (GtkWidget *widget,
|
|||
gpointer data);
|
||||
static void tips_show_next (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void tips_toggle_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GtkWidget *tips_dialog = NULL;
|
||||
|
@ -171,16 +171,11 @@ tips_dialog_create (Gimp *gimp)
|
|||
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
button =
|
||||
gtk_check_button_new_with_mnemonic (_("Show tip next time GIMP starts"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), config->show_tips);
|
||||
button = gimp_prop_check_button_new (G_OBJECT (config), "show-tips",
|
||||
_("Show tip next time GIMP starts"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (tips_toggle_update),
|
||||
config);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (bbox);
|
||||
|
@ -278,12 +273,3 @@ tips_show_next (GtkWidget *widget,
|
|||
|
||||
tips_set_labels (current_tip->data);
|
||||
}
|
||||
|
||||
static void
|
||||
tips_toggle_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
g_object_set (G_OBJECT (data),
|
||||
"show-tips", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)),
|
||||
NULL);
|
||||
}
|
||||
|
|
|
@ -1253,6 +1253,9 @@ prefs_dialog_new (Gimp *gimp,
|
|||
prefs_check_button_add (config, "use-help",
|
||||
_("Context Sensitive _Help with \"F1\""),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (config, "show-tips",
|
||||
_("Show Tips on _Startup"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
vbox2 = prefs_frame_new (_("Help Browser"), GTK_CONTAINER (vbox));
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimppropwidgets.h"
|
||||
|
||||
#include "tips-dialog.h"
|
||||
#include "tips-parser.h"
|
||||
|
||||
|
@ -47,8 +49,6 @@ static void tips_show_previous (GtkWidget *widget,
|
|||
gpointer data);
|
||||
static void tips_show_next (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void tips_toggle_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GtkWidget *tips_dialog = NULL;
|
||||
|
@ -171,16 +171,11 @@ tips_dialog_create (Gimp *gimp)
|
|||
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
button =
|
||||
gtk_check_button_new_with_mnemonic (_("Show tip next time GIMP starts"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), config->show_tips);
|
||||
button = gimp_prop_check_button_new (G_OBJECT (config), "show-tips",
|
||||
_("Show tip next time GIMP starts"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (tips_toggle_update),
|
||||
config);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_box_pack_end (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (bbox);
|
||||
|
@ -278,12 +273,3 @@ tips_show_next (GtkWidget *widget,
|
|||
|
||||
tips_set_labels (current_tip->data);
|
||||
}
|
||||
|
||||
static void
|
||||
tips_toggle_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
g_object_set (G_OBJECT (data),
|
||||
"show-tips", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)),
|
||||
NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue