[rhythmbox] shell: add packing parameters for plugin-provided widgets (bug #585524)
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Subject: [rhythmbox] shell: add packing parameters for plugin-provided widgets (bug #585524)
- Date: Fri, 12 Jun 2009 09:04:29 -0400 (EDT)
commit e2f9d8063aaf04e42864e094a80e692b48dd97a4
Author: John Iacona <plate0salad gmail com>
Date: Fri Jun 12 23:01:45 2009 +1000
shell: add packing parameters for plugin-provided widgets (bug #585524)
Adds packing parameters (same as those for gtk_box_pack_start) to
rb_shell_add_widget. For the python bindings, the previously used
values are now the defaults. C plugins will require code changes to
compile.
bindings/python/rb.defs | 2 ++
plugins/visualizer/rb-visualizer-plugin.c | 6 ++++--
shell/rb-shell.c | 4 ++--
shell/rb-shell.h | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/bindings/python/rb.defs b/bindings/python/rb.defs
index d55e475..13fe0f5 100644
--- a/bindings/python/rb.defs
+++ b/bindings/python/rb.defs
@@ -1293,6 +1293,8 @@
(parameters
'("GtkWidget*" "widget")
'("RBShellUILocation" "location")
+ '("gboolean" "expand" (default "FALSE"))
+ '("gboolean" "fill" (default "TRUE"))
)
)
diff --git a/plugins/visualizer/rb-visualizer-plugin.c b/plugins/visualizer/rb-visualizer-plugin.c
index 53d1b74..a11a64b 100644
--- a/plugins/visualizer/rb-visualizer-plugin.c
+++ b/plugins/visualizer/rb-visualizer-plugin.c
@@ -1240,7 +1240,9 @@ update_window (RBVisualizerPlugin *plugin, VisualizerMode mode, int screen, int
rb_shell_add_widget (plugin->shell,
plugin->vis_box,
- RB_SHELL_UI_LOCATION_MAIN_BOTTOM);
+ RB_SHELL_UI_LOCATION_MAIN_BOTTOM,
+ FALSE,
+ TRUE);
if (plugin->xoverlay != NULL) {
gst_x_overlay_set_xwindow_id (plugin->xoverlay, plugin->remote_window);
@@ -1709,7 +1711,7 @@ impl_activate (RBPlugin *plugin,
if (pi->vis_shell == NULL) {
pi->vis_shell = gtk_vbox_new (FALSE, 0);
- rb_shell_add_widget (pi->shell, pi->vis_shell, RB_SHELL_UI_LOCATION_MAIN_NOTEBOOK);
+ rb_shell_add_widget (pi->shell, pi->vis_shell, RB_SHELL_UI_LOCATION_MAIN_NOTEBOOK, FALSE, TRUE);
}
if (pi->vis_window == NULL) {
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index 6d0c9ad..30ea138 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -3264,7 +3264,7 @@ rb_shell_get_box_for_ui_location (RBShell *shell, RBShellUILocation location)
}
void
-rb_shell_add_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation location)
+rb_shell_add_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation location, gboolean expand, gboolean fill)
{
GtkBox *box;
@@ -3282,7 +3282,7 @@ rb_shell_add_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation locati
box = rb_shell_get_box_for_ui_location (shell, location);
g_return_if_fail (box != NULL);
- gtk_box_pack_start (box, widget, FALSE, TRUE, 0);
+ gtk_box_pack_start (box, widget, expand, fill, 0);
break;
}
}
diff --git a/shell/rb-shell.h b/shell/rb-shell.h
index b637927..7565fc9 100644
--- a/shell/rb-shell.h
+++ b/shell/rb-shell.h
@@ -162,7 +162,7 @@ gboolean rb_shell_get_party_mode (RBShell *shell);
void rb_shell_append_source (RBShell *shell, RBSource *source, RBSource *parent);
-void rb_shell_add_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation location);
+void rb_shell_add_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation location, gboolean expand, gboolean fill);
void rb_shell_remove_widget (RBShell *shell, GtkWidget *widget, RBShellUILocation location);
void rb_shell_notebook_set_page (RBShell *shell, GtkWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]