rpms/gnome-panel/F-8 gnome-panel-2.20.1-compiz-support.patch, NONE, 1.1 gnome-panel.spec, 1.227, 1.228
Adel Gadllah (drago01)
fedora-extras-commits at redhat.com
Mon Nov 12 16:13:03 UTC 2007
Author: drago01
Update of /cvs/pkgs/rpms/gnome-panel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29149
Modified Files:
gnome-panel.spec
Added Files:
gnome-panel-2.20.1-compiz-support.patch
Log Message:
Reenable compiz support in the pager (bug 375691)
gnome-panel-2.20.1-compiz-support.patch:
--- NEW FILE gnome-panel-2.20.1-compiz-support.patch ---
diff -upNr gnome-panel-2.20.1.orign/applets/wncklet/workspace-switcher.c gnome-panel-2.20.1/applets/wncklet/workspace-switcher.c
--- gnome-panel-2.20.1.orign/applets/wncklet/workspace-switcher.c 2007-10-15 22:00:48.000000000 +0200
+++ gnome-panel-2.20.1/applets/wncklet/workspace-switcher.c 2007-11-11 11:38:13.000000000 +0100
@@ -26,6 +26,9 @@
#include <libwnck/libwnck.h>
#include <gconf/gconf-client.h>
#include <libgnomeui/gnome-help.h>
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
#include "workspace-switcher.h"
@@ -55,6 +58,9 @@ typedef struct {
/* Properties: */
GtkWidget *properties_dialog;
+ GtkWidget *notebook;
+ GtkWidget *viewport_child;
+ GtkWidget *workspace_child;
GtkWidget *workspaces_frame;
GtkWidget *workspace_names_label;
GtkWidget *workspace_names_scroll;
@@ -68,7 +74,9 @@ typedef struct {
GtkListStore *workspaces_store;
GtkWidget *about;
-
+ GtkWidget *width_spinbutton;
+ GtkWidget *height_spinbutton;
+
GtkOrientation orientation;
int n_rows; /* for vertical layout this is cols */
WnckPagerDisplayMode display_mode;
@@ -888,6 +896,38 @@ setup_sensitivity (PagerData *pager,
}
static void
+spinbutton_changed (GtkWidget *widget,
+ gpointer data)
+{
+ GConfClient *client = gconf_client_get_default ();
+ const char *key = data;
+
+ int value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget));
+
+ gconf_client_set_int (client, key, value, NULL);
+}
+
+static void
+setup_spinbutton (GtkSpinButton *spin,
+ const char *key,
+ int minimum)
+{
+ GConfClient *client = gconf_client_get_default ();
+ int value;
+
+ if (!gconf_client_key_is_writable (client, key, NULL))
+ gtk_widget_set_sensitive (GTK_WIDGET (spin), FALSE);
+
+ value = gconf_client_get_int (client, key, NULL);
+
+ gtk_spin_button_set_range (spin, minimum, G_MAXINT);
+ gtk_spin_button_set_value (spin, value);
+
+ g_signal_connect (spin, "value_changed", G_CALLBACK (spinbutton_changed), (gpointer)key);
+}
+
+
+static void
setup_dialog (GladeXML *xml,
PagerData *pager)
{
@@ -1026,20 +1066,141 @@ setup_dialog (GladeXML *xml,
pager->properties_dialog);
}
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (pager->notebook), FALSE);
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (pager->notebook), FALSE);
+
+ setup_spinbutton (pager->width_spinbutton, "/apps/compiz/general/screen0/options/hsize", 1);
+ setup_spinbutton (pager->height_spinbutton, "/apps/compiz/general/screen0/options/vsize", 1);
+
update_properties_for_wm (pager);
}
+
+/* get_wm_window() and current_window_manager() are essentially cutted and pasted
+ * from gnome-wm.c from gnome-control-center.
+ */
+static Window
+get_wm_window (void)
+{
+ Window *xwindow;
+ Atom type;
+ gint format;
+ gulong nitems;
+ gulong bytes_after;
+ Window result;
+
+ XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
+ XInternAtom (GDK_DISPLAY (), "_NET_SUPPORTING_WM_CHECK", False),
+ 0, G_MAXLONG, False, XA_WINDOW, &type, &format,
+ &nitems, &bytes_after, (guchar **) &xwindow);
+
+ if (type != XA_WINDOW)
+ {
+ return None;
+ }
+
+ gdk_error_trap_push ();
+ XSelectInput (GDK_DISPLAY (), *xwindow, StructureNotifyMask | PropertyChangeMask);
+ XSync (GDK_DISPLAY (), False);
+
+ if (gdk_error_trap_pop ())
+ {
+ XFree (xwindow);
+ return None;
+ }
+
+ result = *xwindow;
+ XFree (xwindow);
+
+ return result;
+}
+
+static char*
+get_current_window_manager (void)
+{
+ Atom utf8_string, atom, type;
+ int result;
+ char *retval;
+ int format;
+ gulong nitems;
+ gulong bytes_after;
+ gchar *val;
+ Window wm_window = get_wm_window ();
+
+ utf8_string = XInternAtom (GDK_DISPLAY (), "UTF8_STRING", False);
+ atom = XInternAtom (GDK_DISPLAY (), "_NET_WM_NAME", False);
+
+ gdk_error_trap_push ();
+
+ result = XGetWindowProperty (GDK_DISPLAY (),
+ wm_window,
+ atom,
+ 0, G_MAXLONG,
+ False, utf8_string,
+ &type, &format, &nitems,
+ &bytes_after, (guchar **)&val);
+
+ if (gdk_error_trap_pop () || result != Success)
+ return NULL;
+
+ if (type != utf8_string ||
+ format !=8 ||
+ nitems == 0)
+ {
+ if (val)
+ XFree (val);
+ return NULL;
+ }
+
+ if (!g_utf8_validate (val, nitems, NULL))
+ {
+ XFree (val);
+ return NULL;
+ }
+
+ retval = g_strndup (val, nitems);
+
+ XFree (val);
+
+ return retval;
+}
+
+static gboolean
+compiz_is_running (void)
+{
+ gboolean result;
+ char *wm = get_current_window_manager ();
+
+ result = wm && strcmp (wm, "compiz") == 0;
+
+ g_free (wm);
+
+ return result;
+ }
+
+
+
static void
display_properties_dialog (BonoboUIComponent *uic,
PagerData *pager,
const gchar *verbname)
{
- if (pager->properties_dialog == NULL) {
- GladeXML *xml;
[...1684 lines suppressed...]
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Height:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">columns</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">rows</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="spinbutton1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 100 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="spinbutton2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 100 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label8</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
Index: gnome-panel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-panel/F-8/gnome-panel.spec,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -r1.227 -r1.228
--- gnome-panel.spec 16 Oct 2007 03:48:21 -0000 1.227
+++ gnome-panel.spec 12 Nov 2007 16:12:30 -0000 1.228
@@ -22,7 +22,7 @@
Summary: GNOME panel
Name: gnome-panel
Version: 2.20.1
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-panel/2.20/%{name}-%{version}.tar.bz2
Source1: redhat-panel-default-setup.entries
@@ -104,6 +104,8 @@
# try to deal with the 22/24 madness in icon themes
Patch12: more-sharp-icons.patch
+#compiz support
+Patch13: gnome-panel-2.20.1-compiz-support.patch
Conflicts: gnome-power-manager < 2.15.3
@@ -142,6 +144,7 @@
%patch10 -p1 -b .preferred-apps
%patch11 -p1 -b .applet-error
%patch12 -p1 -b .more-sharp-icons
+%patch13 -p1 -b .compiz-support
. %{SOURCE4}
@@ -321,6 +324,9 @@
%{_datadir}/gtk-doc/html/*
%changelog
+* Sun Nov 11 2007 Adel Gadllah <adel.gadllah at gmail.com> - 2.20.1-2
+- Readd compiz support to the pager
+
* Mon Oct 15 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.1-1
- Update to 2.20.1 (translation updates)
More information about the fedora-extras-commits
mailing list