[gnome-control-center] printers: add junctions for allowed users list
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: add junctions for allowed users list
- Date: Wed, 26 Jan 2011 21:42:23 +0000 (UTC)
commit 72de22398c08c189d6f6ae1e21e48bb2dbcc1dc2
Author: William Jon McCann <jmccann redhat com>
Date: Wed Jan 26 15:53:08 2011 -0500
printers: add junctions for allowed users list
panels/printers/cc-printers-panel.c | 38 +++++++---------------------------
panels/printers/printers.ui | 2 +-
2 files changed, 9 insertions(+), 31 deletions(-)
---
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 3d91331..d106de3 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -1674,35 +1674,6 @@ printer_maintenance_cb (GtkButton *button,
}
static void
-set_widget_style (GtkWidget *widget, gchar *style_data)
-{
- GtkStyleProvider *provider;
- GtkStyleContext *context;
-
- if (widget)
- {
- context = gtk_widget_get_style_context (widget);
- provider = g_object_get_data (G_OBJECT (widget), "provider");
-
- if (provider == NULL)
- {
- provider = (GtkStyleProvider *)gtk_css_provider_new ();
- g_object_set_data (G_OBJECT (widget), "provider", provider);
- gtk_style_context_add_provider (context,
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- gtk_css_provider_load_from_data ((GtkCssProvider *)provider,
- style_data, -1, NULL);
- g_object_unref (provider);
- }
- else
- gtk_css_provider_load_from_data ((GtkCssProvider *)provider,
- style_data, -1, NULL);
- gtk_style_context_invalidate (context);
- }
-}
-
-static void
cc_printers_panel_init (CcPrintersPanel *self)
{
CcPrintersPanelPrivate *priv;
@@ -1710,6 +1681,7 @@ cc_printers_panel_init (CcPrintersPanel *self)
GtkWidget *widget;
GError *error = NULL;
gchar *objects[] = { "main-vbox", NULL };
+ GtkStyleContext *context;
priv = self->priv = PRINTERS_PANEL_PRIVATE (self);
@@ -1785,8 +1757,14 @@ cc_printers_panel_init (CcPrintersPanel *self)
g_signal_connect (widget, "clicked", G_CALLBACK (printer_maintenance_cb), self);
widget = (GtkWidget*)
+ gtk_builder_get_object (priv->builder, "allowed-users-scrolledwindow");
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
+
+ widget = (GtkWidget*)
gtk_builder_get_object (priv->builder, "allowed-users-toolbar");
- set_widget_style (widget, "GtkToolbar { border-style: none }");
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
gtk_style_context_get_background_color (gtk_widget_get_style_context (top_widget),
GTK_STATE_FLAG_NORMAL,
diff --git a/panels/printers/printers.ui b/panels/printers/printers.ui
index a3f2ba1..f7d5c3d 100644
--- a/panels/printers/printers.ui
+++ b/panels/printers/printers.ui
@@ -61,7 +61,7 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <object class="GtkScrolledWindow" id="allowed-users-scrolledwindow">
<property name="height_request">90</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]