Bug#405936: gpomme: Allow the use of MacOSX theme (and maybe also Classic)

2007-01-07 Thread Ludovic Rousseau
Package: gpomme
Version: 1.0-2
Severity: wishlist
Tags: patch

I prefer the MacOSX theme over the CrystalLarge one.

Maybe it would be a good idea to add a Depends: or Suggests: on
gtkpbbuttons-common and reuse the MacOSX theme.

The theme could be configured using the command line.
I also find the icons to be too transarent and then hard to read. One
solution I found is to change the color of the text from white to black.

I propose the patch below. gpomme can now be used as:
$ gpomme /usr/share/gtkpbbuttons/themes/MacOSX black


diff -ru pommed-1.0/gpomme/gpomme.c pommed-1.0.new/gpomme/gpomme.c
--- pommed-1.0/gpomme/gpomme.c  2006-12-24 13:40:36.0 +0100
+++ pommed-1.0.new/gpomme/gpomme.c  2007-01-07 14:49:30.0 +0100
@@ -68,6 +68,7 @@
 
 DBusError dbus_err;
 DBusConnection *conn;
+char *ForegroundColor = white;
 
 
 gboolean
@@ -159,7 +160,7 @@
   if (u_label == NULL)
 m_label = ;
   else /* accepts only UTF-8 input ... segfaults otherwise */
-m_label = g_markup_printf_escaped(span weight=\bold\ 
foreground=\white\%s/span, u_label);
+m_label = g_markup_printf_escaped(span weight=\bold\ 
foreground=\%s\%s/span, ForegroundColor, u_label);
 
   gtk_label_set_markup(GTK_LABEL(mbp_w.label), m_label);
 
@@ -357,6 +358,7 @@
 int main(int argc, char **argv)
 {
   int ret;
+  char *theme = CrystalLarge;
 
   /* The DBus connection will be initiated when
* mbp_dbus_listen() is called for the first time
@@ -375,7 +377,14 @@
 
   gtk_init(argc, argv);
 
-  ret = theme_load(CrystalLarge);
+  printf(argc: %d\n, argc);
+  if (argc  1)
+ theme=argv[1];
+
+  if (argc  2)
+ ForegroundColor=argv[2];
+
+  ret = theme_load(theme);
   if (ret  0)
 exit(1);
 
diff -ru pommed-1.0/gpomme/theme.c pommed-1.0.new/gpomme/theme.c
--- pommed-1.0/gpomme/theme.c   2006-12-24 12:30:47.0 +0100
+++ pommed-1.0.new/gpomme/theme.c   2007-01-07 14:48:32.0 +0100
@@ -45,7 +45,10 @@
   char file[PATH_MAX];
   int ret;
 
-  ret = snprintf(file, PATH_MAX, %s/%s/%s, THEME_BASE, name, img);
+  if ('/' == name[0])
+ ret = snprintf(file, PATH_MAX, %s/%s, name, img);
+  else
+ ret = snprintf(file, PATH_MAX, %s/%s/%s, THEME_BASE, name, img);
   if (ret = PATH_MAX)
 return NULL;
 
@@ -70,7 +73,10 @@
   char file[PATH_MAX];
   int ret;
 
-  ret = snprintf(file, PATH_MAX, %s/%s/background.png, THEME_BASE, name);
+  if ('/' == name[0])
+ ret = snprintf(file, PATH_MAX, %s/background.png, name);
+  else
+ ret = snprintf(file, PATH_MAX, %s/%s/background.png, THEME_BASE, 
name);
   if (ret = PATH_MAX)
 return -1;
 

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (90, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gpomme depends on:
ii  dbus 1.0.2-1 simple interprocess messaging syst
ii  libasound2   1.0.13-1ALSA library
ii  libatk1.0-0  1.12.3-1The ATK accessibility toolkit
ii  libaudiofile00.2.6-6 Open-source version of SGI's audio
ii  libc62.3.6.ds1-8 GNU C Library: Shared libraries
ii  libcairo21.2.4-4 The Cairo 2D vector graphics libra
ii  libdbus-1-3  1.0.2-1 simple interprocess messaging syst
ii  libfontconfig1   2.4.1-2 generic font configuration library
ii  libglib2.0-0 2.12.4-2The GLib library of C routines
ii  libgtk2.0-0  2.8.20-3The GTK+ graphical user interface 
ii  libpango1.0-01.14.8-4Layout and rendering of internatio
ii  libx11-6 2:1.0.3-4   X11 client-side library
ii  libxcursor1  1.1.7-4 X cursor management library
ii  libxext6 1:1.0.1-2   X11 miscellaneous extension librar
ii  libxfixes3   1:4.0.1-5   X11 miscellaneous 'fixes' extensio
ii  libxi6   1:1.0.1-4   X11 Input extension library
ii  libxinerama1 1:1.0.1-4.1 X11 Xinerama extension library
ii  libxrandr2   2:1.1.0.2-5 X11 RandR extension library
ii  libxrender1  1:0.9.1-3   X Rendering Extension client libra
ii  pommed   1.0-2   Apple laptops hotkeys event handle

gpomme recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#405936: gpomme: Allow the use of MacOSX theme (and maybe also Classic)

2007-01-07 Thread Julien BLACHE
Ludovic Rousseau [EMAIL PROTECTED] wrote:

Hi,

 I prefer the MacOSX theme over the CrystalLarge one.

 Maybe it would be a good idea to add a Depends: or Suggests: on
 gtkpbbuttons-common and reuse the MacOSX theme.

I don't intend to directly reuse the gtkpbbuttons themes, for a
variety of reasons, so this is a no go.

 The theme could be configured using the command line.
 I also find the icons to be too transarent and then hard to read. One
 solution I found is to change the color of the text from white to black.

Depends on your background I guess, would you mind sending me a
screenshot ?

 I propose the patch below. gpomme can now be used as:
 $ gpomme /usr/share/gtkpbbuttons/themes/MacOSX black

There's something similar in the SVN already, and there are plans for
a small config GUI too, but no ETA for that.

JB.

-- 
 Julien BLACHE - Debian  GNU/Linux Developer - [EMAIL PROTECTED] 
 
 Public key available on http://www.jblache.org - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#405936: gpomme: Allow the use of MacOSX theme (and maybe also Classic)

2007-01-07 Thread Julien BLACHE
Ludovic Rousseau [EMAIL PROTECTED] wrote:

Hi,

 I also tried to make CrystalLarge/background.png less transparent but I
 am not a gimp expert and failed miserably :-(

Use
http://svn.technologeek.org/repos/mbpeventd/trunk/gpomme/themes/CrystalLarge/src/background.svg

Open it in Inkscape, change the fill color, select the rectangle and
use File-Export bitmap, be sure to select Selection and here you
have your new background tile :-)

 I find the slider level not very readable. The Mac OS X version unsing
 white squares is better I think (better contrast).

Mac OS X hardcodes n levels for each control, so it's easy for them to
just draw n dots/squares. That's not the way pommed works, so it
really wouldn't fit here.

JB.

-- 
 Julien BLACHE - Debian  GNU/Linux Developer - [EMAIL PROTECTED] 
 
 Public key available on http://www.jblache.org - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#405936: gpomme: Allow the use of MacOSX theme (and maybe also Classic)

2007-01-07 Thread Ludovic Rousseau
Le 07.01.2007, à 19:13:29, Julien BLACHE a écrit:
 Use
 http://svn.technologeek.org/repos/mbpeventd/trunk/gpomme/themes/CrystalLarge/src/background.svg
 
 Open it in Inkscape, change the fill color, select the rectangle and
 use File-Export bitmap, be sure to select Selection and here you
 have your new background tile :-)

It is much easier to change it using the source code.
Maybe you could provide the SVG file in the .tar.gz archive?

 Mac OS X hardcodes n levels for each control, so it's easy for them to
 just draw n dots/squares. That's not the way pommed works, so it
 really wouldn't fit here.

I see.
Using a white rectangle would be much nicer with the Mac OS X theme.
I will try to see if I can hack something.

Thanks

-- 
 Dr. Ludovic Rousseau[EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --



Bug#405936: gpomme: Allow the use of MacOSX theme (and maybe also Classic)

2007-01-07 Thread Julien BLACHE
Ludovic Rousseau [EMAIL PROTECTED] wrote:

 Open it in Inkscape, change the fill color, select the rectangle and
 use File-Export bitmap, be sure to select Selection and here you
 have your new background tile :-)

 It is much easier to change it using the source code.
 Maybe you could provide the SVG file in the .tar.gz archive?

I've just redone the background tile yesterday, so it's new in the SVN
:)

 Mac OS X hardcodes n levels for each control, so it's easy for them to
 just draw n dots/squares. That's not the way pommed works, so it
 really wouldn't fit here.

 I see.
 Using a white rectangle would be much nicer with the Mac OS X theme.
 I will try to see if I can hack something.

I'm still trying to figure out how I can change the color of the
progress bar. No luck so far. (did I already mention that I hate GTK ?)

JB.

-- 
 Julien BLACHE [EMAIL PROTECTED]  |  Debian, because code matters more 
 Debian  GNU/Linux Developer|   http://www.debian.org
 Public key available on http://www.jblache.org - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]