Commit 938f24fd authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added the widget living in the right_vbox to the GimpBrowser struct

2005-06-23  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpbrowser.[ch]: added the widget living in the
	right_vbox to the GimpBrowser struct instead of attaching it to
	the browser.
parent 3571a580
2005-06-23 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimpbrowser.[ch]: added the widget living in the
right_vbox to the GimpBrowser struct instead of attaching it to
the browser.
2005-06-22 Sven Neumann <sven@gimp.org>
* plug-ins/FractalExplorer/FractalExplorer.c: applied a patch from
......
......@@ -238,48 +238,40 @@ void
gimp_browser_set_widget (GimpBrowser *browser,
GtkWidget *widget)
{
GtkWidget *child;
g_return_if_fail (GIMP_IS_BROWSER (browser));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (widget == NULL || GTK_IS_WIDGET (widget));
child = g_object_get_data (G_OBJECT (browser->right_vbox), "child");
if (widget == browser->right_widget)
return;
if (child)
gtk_container_remove (GTK_CONTAINER (browser->right_vbox), child);
if (browser->right_widget)
gtk_container_remove (GTK_CONTAINER (browser->right_vbox),
browser->right_widget);
gtk_box_pack_start (GTK_BOX (browser->right_vbox), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
browser->right_widget = widget;
g_object_set_data (G_OBJECT (browser->right_vbox), "child", widget);
if (widget)
{
gtk_box_pack_start (GTK_BOX (browser->right_vbox), widget,
FALSE, FALSE, 0);
gtk_widget_show (widget);
}
}
void
gimp_browser_show_message (GimpBrowser *browser,
const gchar *message)
{
GtkWidget *child;
g_return_if_fail (GIMP_IS_BROWSER (browser));
g_return_if_fail (message != NULL);
child = g_object_get_data (G_OBJECT (browser->right_vbox), "child");
if (GTK_IS_LABEL (child))
if (GTK_IS_LABEL (browser->right_widget))
{
gtk_label_set_text (GTK_LABEL (child), message);
gtk_label_set_text (GTK_LABEL (browser->right_widget), message);
}
else
{
if (child)
gtk_container_remove (GTK_CONTAINER (browser->right_vbox), child);
child = gtk_label_new (message);
gtk_box_pack_start (GTK_BOX (browser->right_vbox), child,
FALSE, FALSE, 0);
gtk_widget_show (child);
g_object_set_data (G_OBJECT (browser->right_vbox), "child", child);
gimp_browser_set_widget (browser, gtk_label_new (message));
}
while (gtk_events_pending ())
......
......@@ -55,6 +55,7 @@ struct _GimpBrowser
GtkWidget *count_label;
GtkWidget *right_vbox;
GtkWidget *right_widget;
};
struct _GimpBrowserClass
......@@ -64,6 +65,12 @@ struct _GimpBrowserClass
void (* search) (GimpBrowser *browser,
const gchar *search_string,
gint search_type);
/* Padding for future expansion */
void (* _gimp_reserved1) (void);
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment