Re: [Rhythmbox-devel] [patch] Minor UI polishing in the plugin configuration dialog
- From: "Christophe Dehais" <christophe dehais gmail com>
- To: "Rhythmbox-devel list" <rhythmbox-devel gnome org>
- Subject: Re: [Rhythmbox-devel] [patch] Minor UI polishing in the plugin configuration dialog
- Date: Sun, 11 Feb 2007 17:41:28 +0100
Sorry, updating the patch ...
This version fixes the plugin list appearance described previously and
also adapt the size of the plugin icon so that it fits correctly in
the description (useful for big svg icons)
Also didn't mention that it's against current SVN.
Christophe
On 2/11/07, Christophe Dehais <christophe dehais gmail com> wrote:
Hi!
This patch makes the headers of the list of plugins fixed (don't
scroll with the list itself) in the plugin configuration dialog.
cheers,
Christophe
*** plugins/rb-plugin-manager.c.old 2007-02-11 14:31:12.000000000 +0100
--- plugins/rb-plugin-manager.c 2007-02-11 17:36:24.000000000 +0100
***************
*** 60,65 ****
--- 60,66 ----
GtkWidget *copyright_label;
GtkWidget *authors_label;
GtkWidget *description_label;
+ GtkWidget *header_hbox;
GtkWidget *plugin_icon;
GtkWidget *site_text;
GtkWidget *copyright_text;
***************
*** 176,183 ****
gtk_label_set_text (GTK_LABEL (pm->priv->authors_text), string);
g_free (string);
! gtk_image_set_from_pixbuf (GTK_IMAGE (pm->priv->plugin_icon),
! rb_plugins_engine_get_plugin_icon (info));
gtk_widget_set_sensitive (GTK_WIDGET (pm->priv->configure_button),
(info != NULL) &&
--- 177,205 ----
gtk_label_set_text (GTK_LABEL (pm->priv->authors_text), string);
g_free (string);
! { /* plugin icon */
! GdkPixbuf *icon = rb_plugins_engine_get_plugin_icon (info);
! if (icon != NULL) {
! GdkPixbuf *icon_scaled;
! gint width, height, header_height;
!
! width = gdk_pixbuf_get_width (icon);
! height = gdk_pixbuf_get_height (icon);
! header_height = pm->priv->header_hbox->allocation.height;
! if (height > header_height) { /* resize to fit */
! icon_scaled = gdk_pixbuf_scale_simple (icon,
! (gfloat)width/height*header_height, header_height,
! GDK_INTERP_BILINEAR);
! gtk_image_set_from_pixbuf (GTK_IMAGE (pm->priv->plugin_icon), icon_scaled);
! g_object_unref (G_OBJECT (icon_scaled));
! } else {
! gtk_image_set_from_pixbuf (GTK_IMAGE (pm->priv->plugin_icon), icon);
! }
!
! } else {
! gtk_image_set_from_pixbuf (GTK_IMAGE (pm->priv->plugin_icon), NULL);
! }
! }
gtk_widget_set_sensitive (GTK_WIDGET (pm->priv->configure_button),
(info != NULL) &&
***************
*** 445,451 ****
rb_plugin_manager_init (RBPluginManager *pm)
{
GladeXML *xml;
! GtkWidget *plugins_tree_vbox;
pm->priv = RB_PLUGIN_MANAGER_GET_PRIVATE (pm);
--- 467,473 ----
rb_plugin_manager_init (RBPluginManager *pm)
{
GladeXML *xml;
! GtkWidget *plugins_window;
pm->priv = RB_PLUGIN_MANAGER_GET_PRIVATE (pm);
***************
*** 457,464 ****
gtk_box_set_spacing (GTK_BOX (pm), 6);
pm->priv->tree = gtk_tree_view_new ();
! plugins_tree_vbox = glade_xml_get_widget (xml, "plugins_tree_vbox");
! gtk_container_add (GTK_CONTAINER (plugins_tree_vbox), pm->priv->tree);
pm->priv->configure_button = glade_xml_get_widget (xml, "configure_button");
g_signal_connect (pm->priv->configure_button,
--- 479,486 ----
gtk_box_set_spacing (GTK_BOX (pm), 6);
pm->priv->tree = gtk_tree_view_new ();
! plugins_window = glade_xml_get_widget (xml, "plugins_scrolledwindow");
! gtk_container_add (GTK_CONTAINER (plugins_window), pm->priv->tree);
pm->priv->configure_button = glade_xml_get_widget (xml, "configure_button");
g_signal_connect (pm->priv->configure_button,
***************
*** 466,471 ****
--- 488,495 ----
G_CALLBACK (configure_button_cb),
pm);
+ pm->priv->header_hbox = glade_xml_get_widget (xml, "header_hbox");
+
pm->priv->plugin_title = glade_xml_get_widget (xml, "plugin_title");
pm->priv->site_label = glade_xml_get_widget (xml, "site_label");
*** data/glade/plugins.glade.old 2007-02-11 14:29:52.000000000 +0100
--- data/glade/plugins.glade 2007-02-11 17:32:25.000000000 +0100
***************
*** 33,63 ****
<property name="spacing">12</property>
<child>
! <widget class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
! <property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
! <widget class="GtkViewport" id="viewport1">
! <property name="visible">True</property>
! <property name="shadow_type">GTK_SHADOW_IN</property>
!
! <child>
! <widget class="GtkVBox" id="plugins_tree_vbox">
! <property name="visible">True</property>
! <property name="homogeneous">False</property>
! <property name="spacing">0</property>
!
! <child>
! <placeholder/>
! </child>
! </widget>
! </child>
! </widget>
</child>
</widget>
<packing>
--- 33,48 ----
<property name="spacing">12</property>
<child>
! <widget class="GtkScrolledWindow" id="plugins_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
! <property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
! <placeholder/>
</child>
</widget>
<packing>
***************
*** 74,81 ****
<property name="spacing">6</property>
<child>
! <widget class="GtkHBox" id="hbox4">
! <property name="height_request">50</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
--- 59,66 ----
<property name="spacing">6</property>
<child>
! <widget class="GtkHBox" id="header_hbox">
! <property name="height_request">64</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]