Re: [Ayatana] [Concept suggestion] About the new possibilities for the top right window buttons on the new Ubuntu visual

2010-03-30 Thread Jim Rorie
On Tue, 2010-03-30 at 09:49 +0200, Thorsten Wilms wrote:
 On Mon, 2010-03-29 at 20:36 -0300, kernel_script wrote:
  Hallo guys,
  
  I just saw a great work from a FOSS community designer exploring the new 
  possibilities for the top right window buttons on the new Ubuntu visual, 
  and wanted to share the info with Ayatana team, since I think the 
  concept is really interesting and a really good idea, and it explore 
  very well the idea that Mr. Shuttleworth talked about on his blog post.
  
  www.design-by-izo.com/2010/03/29/workflow-and-upload-two-new-button-concepts-for-lucid/
 


This is a bit interesting.  I like the idea of the quick short-cut
button.  I'm not sure that it should be defined as an upload button, but
maybe a program defined operations.  This could be pretty novel and
potentially save effort.

As for the load button, I'm not seeing that this gives any more
functionality that we already have.  File/Open is well defined to the
point of cliche.  And the two clicks involved don't appear to save any
time or effort.

This could be as easily implemented on the left as it could on the
right, tho.




smime.p7s
Description: S/MIME cryptographic signature
___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] Restart required indicator

2010-03-30 Thread Jim Rorie
I think someone mentioned dots earlier.  Makes sense from a grammatical
point, since the each of the operations is an end point for the current
session.



On Mon, 2010-03-29 at 22:05 -0500, Ted Gould wrote:
 On Mon, 2010-03-29 at 16:17 -0400, Jim Rorie wrote:
  Could you not use red arrows like the blue ones in the messaging
  indicator?
 
 Yes, icons would be fine.  We should probably come up with something
 more holistic as was mentioned in another fork of this thread.  I'm not
 sure that Application Running and Restart Required are really
 similar enough to warrant the same graphic.  I guess you could look at
 it as Attention Required but that's not really the point of the ones
 in the messaging menu today.
 
   --Ted
 


smime.p7s
Description: S/MIME cryptographic signature
___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] [Concept suggestion] About the new possibilities for the top right window buttons on the new Ubuntu visual

2010-03-30 Thread Yann Lossouarn




- Jim Rorie jfro...@gmail.com a écrit :
 This is a bit interesting.  I like the idea of the quick short-cut
 button.  I'm not sure that it should be defined as an upload button,
 but
 maybe a program defined operations.  This could be pretty novel and
 potentially save effort.
 As for the load button, I'm not seeing that this gives any more
 functionality that we already have.  File/Open is well defined to the
 point of cliche.  And the two clicks involved don't appear to save
 any
 time or effort.

Really ? I think it would great having a standardized way to perform some sort 
of basic copy/paste action aimed at the entire file you're working on, in 
order to transfer the file from an application to another. It would be useful 
for frequent and quite complex operations like I work on file X with software 
A, I save it somewhere to use it as an input in software B, I modify it a bit, 
save it somewhere else, and then use it as an input in software C would be 
*great*. Basically, it's true that File/Open is simple. But one should not 
forget that having to select the place where you have to save, and finding this 
place again to load the file inside another software in Nautilus takes time. 
For example when you want to reduce the filesize of photos before sending it to 
someone by email. I'd like to copy current photo, paste it to Gimp, crop it 
and reduce it, then copy/paste it to Thunderbird without having to navigate 
inside Nautilus. 

 This could be as easily implemented on the left as it could on the
 right, tho.
 
 
 
 ___
 Mailing list: https://launchpad.net/~ayatana
 Post to : ayatana@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~ayatana
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] [Concept suggestion] About the new possibilities for the top right window buttons on the new Ubuntu visual

2010-03-30 Thread Diego Moya
On 30 March 2010 17:56, Yann Lossouarn wrote:


  For example when you want to reduce the filesize of photos before sending
 it to someone by email. I'd like to copy current photo, paste it to
 Gimp, crop it and reduce it, then copy/paste it to Thunderbird without
 having to navigate inside Nautilus.

 Doubleplus good if it integrates with a file versioning system that stores
the intermediate versions at each step.



 Really ? I think it would great having a standardized way to perform some
 sort of basic copy/paste action aimed at the entire file you're working
 on, in order to transfer the file from an application to another.


Actually, the proposed idea generalizes in a simple way to define
_arbitrary_ workflows for the desktop. This workflow button is a *great* way
to integrate in a user-friendly way the complex Workflow features as seen in
Content Management Systems. Think of the possibilities.

The available targets for the document could be defined by external
administrators (the distro creators, or an online repository) to which the
user can subscribe. Throwing the current document to a target could have
extra processes other than opening in a different application - such as
versioning, saving a copy to a shared folder, applying a visual filter to an
image...

The simple proposed use cases (Open with and Upload to) are likely the
more useful. But if these buttons can be configured by the user to their
liking (one for the local workflows and the other for sharing), it can be
a powerful and innovative feature.
___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] Restart required indicator

2010-03-30 Thread Vishnoo
On Mon, 2010-03-29 at 22:05 -0500, Ted Gould wrote:
 On Mon, 2010-03-29 at 16:17 -0400, Jim Rorie wrote:
  Could you not use red arrows like the blue ones in the messaging
  indicator?
 
 Yes, icons would be fine.  We should probably come up with something
 more holistic as was mentioned in another fork of this thread.  I'm not
 sure that Application Running and Restart Required are really
 similar enough to warrant the same graphic.  I guess you could look at
 it as Attention Required but that's not really the point of the ones
 in the messaging menu today.
 
   --Ted
 

Actually those blue arrows stick out in an otherwise monochrome menu.

It would probably be better to use the new checkmarks or the
radiomarks , instead of the color icons. [mockup attached]
Or just toggle transparencies of the active application icons. Currently
there are too many rows of info there.

-- 
Cheers,
Vish
attachment: Screenshot-1.png___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] [Concept suggestion] About the new possibilities for the top right window buttons on the new Ubuntu visual

2010-03-30 Thread Jim Rorie
On Tue, 2010-03-30 at 17:56 +0200, Yann Lossouarn wrote:

 
 Really ? I think it would great having a standardized way to perform
 some sort of basic copy/paste action aimed at the entire file you're
 working on, 

My objection was that I thought it was duplicating the File-Open
File-Save Menu options, a la the new Windoze ribbon interface.  Your
explanation is for all intents a button copy/paste context menu on the
window. Based on that, perhaps my interest is piqued a little more. 

My concern would be selection context.  If you were in f-spot or picasa,
what would your selection be?  The current photo? An entire album?  The
auto selection could present confusion to the user.  

To the power user, I don't see this as an enhancement.  IMHO, the
Ctrl-A, Ctrl-C key sequences typically are used enough that they can be
done by a non-touch typist in during a sandstorm.  The noob might might
find some novelty if they were comfortable with the context issues.

I do REALLY like the idea of global definable window button, tho.
Examples that come to mind: Downloads for firefox, upload for f-spot or
empathy, quickprint for Office.

But given the definable nature, it isn't consistent so might be
confusing. It reminds me of the convenience buttons on cell phones. But
that a single global button, so the comparison might be stretched.






___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


Re: [Ayatana] [Concept suggestion] About the new possibilities for the top right window buttons on the new Ubuntu visual

2010-03-30 Thread Diego Moya
On 30 March 2010 19:22, Jim Rorie wrote:

 On Tue, 2010-03-30 at 18:47 +0200, Diego Moya wrote:

 Ok, you guys got more out of the document that I did.  Bad Latte. :(

 Ignore my last email.  If the button is an entry point to a workflow
 concept, count me in.

 Or I might be reading too much :-)

The original proposal was much simpler.
___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


[Ayatana] Gallery

2010-03-30 Thread Martin Owens
Hey Designers,

I want to make sure your all aware of the Ubuntu deviantArt group and
most especially the User Interfaces gallery:

http://ubuntu-artists.deviantart.com/gallery/24128075

I invite you all to submit your works and have a look at the existing
submitted concepts. Some of which are fairly interesting.

http://ubuntu-artists.deviantart.com/

Best Regards, Martin Owens


___
Mailing list: https://launchpad.net/~ayatana
Post to : ayatana@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/blocking_animation_second_attempt into lp:indicator-sound

2010-03-30 Thread Conor Curran
Conor Curran has proposed merging 
lp:~cjcurran/indicator-sound/blocking_animation_second_attempt into 
lp:indicator-sound.

Requested reviews:
  Cody Russell (bratsche)

-- 
https://code.launchpad.net/~cjcurran/indicator-sound/blocking_animation_second_attempt/+merge/22459
Your team ayatana-commits is subscribed to branch lp:indicator-sound.
=== modified file 'src/indicator-sound.c'
--- src/indicator-sound.c	2010-03-24 15:47:37 +
+++ src/indicator-sound.c	2010-03-30 15:00:37 +
@@ -125,11 +125,13 @@
 static gboolean slider_in_direct_use;
 
 static GtkIconSize design_team_size;
+static gint blocked_id;
 static gint animation_id;
 static GList * blocked_animation_list = NULL;
 static GList * blocked_iter = NULL;
 static void prepare_blocked_animation();
 static gboolean fade_back_to_mute_image();
+static gboolean start_animation();
 
 // Construction
 static void
@@ -371,12 +373,12 @@
 }
 
 // sample 22 snapshots - range : 0-256
-for(i = 0; i  23; i++)
+for(i = 0; i  51; i++)
 {
 gdk_pixbuf_composite(mute_buf, blocked_buf, 0, 0,
  gdk_pixbuf_get_width(mute_buf),
  gdk_pixbuf_get_height(mute_buf),
- 0, 0, 1, 1, GDK_INTERP_BILINEAR, MIN(255, i * 11));
+ 0, 0, 1, 1, GDK_INTERP_BILINEAR, MIN(255, i * 5));
 blocked_animation_list = g_list_append(blocked_animation_list, gdk_pixbuf_copy(blocked_buf));
 }
 }
@@ -505,12 +507,19 @@
 if (block_value == 1  animation_id == 0  blocked_animation_list != NULL) {
 gchar* image_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_MUTED_WHILE_INPUT));
 indicator_image_helper_update(speaker_image, image_name);
-
-blocked_iter = blocked_animation_list;
-animation_id = g_timeout_add_seconds(1, fade_back_to_mute_image, NULL);
+blocked_id = g_timeout_add_seconds(5, start_animation, NULL);
 }
 }
 
+static gboolean start_animation()
+{
+blocked_iter = blocked_animation_list;
+blocked_id = 0;
+animation_id = g_timeout_add(50, fade_back_to_mute_image, NULL);
+g_debug(exit from blocked hold\n);
+return FALSE;
+}
+
 static gboolean fade_back_to_mute_image()
 {
 if(blocked_iter != NULL)

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Branch ~agateau/plasma-widget-message-indicator/trunk] Rev 132: Added a kconf_update file to rename the plugin on existing installations.

2010-03-30 Thread noreply

revno: 132
committer: Aurelien Gateau aurelien.gat...@canonical.com
branch nick: plasma-widget-message-indicator
timestamp: Tue 2010-03-30 17:34:11 +0200
message:
  Added a kconf_update file to rename the plugin on existing installations.
added:
  upd/
  upd/CMakeLists.txt
  upd/message_indicator_applet_rename_plugin.py
  upd/message_indicator_applet_rename_plugin.upd
  upd/test-nothing-to-dorc
  upd/test-one-applet-to-changerc
modified:
  CMakeLists.txt


--
lp:plasma-widget-message-indicator
https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk

Your team ayatana-commits is subscribed to branch 
lp:plasma-widget-message-indicator.
To unsubscribe from this branch go to 
https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk/+edit-subscription.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2010-03-10 09:50:23 +
+++ CMakeLists.txt	2010-03-30 15:34:11 +
@@ -24,6 +24,7 @@
 
 add_subdirectory(src)
 add_subdirectory(tests)
+add_subdirectory(upd)
 
 # Packaging
 set(PROJECT_VERSION 0.5.2)

=== added directory 'upd'
=== added file 'upd/CMakeLists.txt'
--- upd/CMakeLists.txt	1970-01-01 00:00:00 +
+++ upd/CMakeLists.txt	2010-03-30 15:34:11 +
@@ -0,0 +1,5 @@
+install(FILES message_indicator_applet_rename_plugin.upd
+DESTINATION ${KCONF_UPDATE_INSTALL_DIR})
+
+install(PROGRAMS message_indicator_applet_rename_plugin.py
+DESTINATION ${KCONF_UPDATE_INSTALL_DIR})

=== added file 'upd/message_indicator_applet_rename_plugin.py'
--- upd/message_indicator_applet_rename_plugin.py	1970-01-01 00:00:00 +
+++ upd/message_indicator_applet_rename_plugin.py	2010-03-30 15:34:11 +
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+import sys
+from ConfigParser import ConfigParser
+from StringIO import StringIO
+
+OLD_NAME = indicatordisplay
+NEW_NAME = message-indicator
+
+PLUGIN_OPTION = plugin
+
+def main():
+# Get all content and turn nested sections into something ConfigParser can
+# swallow
+content = sys.stdin.read().replace(][, ///)
+
+# Parse data
+io = StringIO(content)
+parser = ConfigParser()
+parser.readfp(io)
+
+# Replace keys where necessary
+for section in parser.sections():
+if not section.startswith(Containments):
+continue
+if parser.has_option(section, PLUGIN_OPTION) and parser.get(section, PLUGIN_OPTION) == OLD_NAME:
+print [%s] % section.replace(///, ][)
+print %s=%s % (PLUGIN_OPTION, NEW_NAME)
+
+return 0
+
+if __name__== __main__:
+sys.exit(main())
+# vi: ts=4 sw=4 et

=== added file 'upd/message_indicator_applet_rename_plugin.upd'
--- upd/message_indicator_applet_rename_plugin.upd	1970-01-01 00:00:00 +
+++ upd/message_indicator_applet_rename_plugin.upd	2010-03-30 15:34:11 +
@@ -0,0 +1,5 @@
+# Rename the applet from indicatordisplay to message-indicator
+Id=RenameMessageIndicatorApplet
+File=plasma-desktop-appletsrc
+Script=message_indicator_applet_rename_plugin.py,python
+Options=overwrite

=== added file 'upd/test-nothing-to-dorc'
--- upd/test-nothing-to-dorc	1970-01-01 00:00:00 +
+++ upd/test-nothing-to-dorc	2010-03-30 15:34:11 +
@@ -0,0 +1,201 @@
+[AppletGlobals][plasma_applet_systemtray]
+ShowApplicationStatus=true
+ShowCommunications=true
+ShowHardware=true
+ShowJobs=false
+ShowNotifications=false
+ShowSystemServices=true
+
+[Containments]
+JauntyUpgradeScriptRun=true
+
+[Containments][1]
+activity=
+desktop=-1
+formfactor=0
+geometry=0,0,1920,1080
+immutability=1
+location=0
+plugin=desktop
+screen=0
+wallpaperplugin=image
+wallpaperpluginmode=SingleImage
+zvalue=0
+
+[Containments][1][Wallpaper][image]
+slideTimer=10
+slidepaths=/usr/share/wallpapers/
+userswallpapers=
+wallpaper=/usr/share/wallpapers/Ethais
+wallpapercolor=56,111,150
+wallpaperposition=0
+
+[Containments][4]
+activity=
+desktop=-1
+formfactor=0
+geometry=1926,0,1280,1024
+immutability=1
+location=0
+plugin=desktop
+screen=1
+wallpaperplugin=image
+wallpaperpluginmode=SingleImage
+zvalue=0
+
+[Containments][4][Wallpaper][image]
+slideTimer=10
+slidepaths=/usr/share/wallpapers/
+userswallpapers=
+wallpaper=/usr/share/wallpapers/Ethais
+wallpapercolor=56,111,150
+wallpaperposition=0
+
+[Containments][5]
+activity=
+desktop=-1
+formfactor=2
+geometry=0,-34,1920,28
+immutability=1
+location=4
+plugin=panel
+screen=0
+zvalue=150
+
+[Containments][5][Applets][11]
+geometry=1614,1,208,27
+immutability=1
+plugin=systemtray
+zvalue=0
+
+[Containments][5][Applets][11][Configuration]
+AutoHidePopup=true
+Share=false
+alwaysShown=
+hidden=
+
+[Containments][5][Applets][11][Configuration][Applets][2]
+geometry=168,0.5,24,24
+immutability=1
+plugin=message-indicator
+zvalue=0
+
+[Containments][5][Applets][11][Configuration][Applets][2][PopupApplet]
+DialogHeight=35
+DialogWidth=132
+
+[Containments][5][Applets][11][Configuration][Applets][3]
+geometry=0,0,250,300
+immutability=1
+plugin=notifier
+zvalue=0
+

Re: [Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/blocking_animation_second_attempt into lp:indicator-sound

2010-03-30 Thread Cody Russell
Review: Approve

-- 
https://code.launchpad.net/~cjcurran/indicator-sound/blocking_animation_second_attempt/+merge/22459
Your team ayatana-commits is subscribed to branch lp:indicator-sound.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~ted/evolution-indicator/plural-forms into lp:evolution-indicator

2010-03-30 Thread noreply
The proposal to merge lp:~ted/evolution-indicator/plural-forms into 
lp:evolution-indicator has been updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~ted/evolution-indicator/plural-forms/+merge/22413
Your team ayatana-commits is subscribed to branch lp:evolution-indicator.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Branch ~indicator-applet-developers/evolution-indicator/trunk] Rev 61: Use property syntax for ngettext

2010-03-30 Thread noreply
Merge authors:
  Ted Gould (ted)
Related merge proposals:
  https://code.launchpad.net/~ted/evolution-indicator/plural-forms/+merge/22413
  proposed by: Ted Gould (ted)
  review: Approve - David Planella (dpm)

revno: 61 [merge]
committer: Ted Gould t...@gould.cx
branch nick: trunk
timestamp: Tue 2010-03-30 13:23:21 -0500
message:
  Use property syntax for ngettext
modified:
  src/evolution-indicator.c


--
lp:evolution-indicator
https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk

Your team ayatana-commits is subscribed to branch lp:evolution-indicator.
To unsubscribe from this branch go to 
https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk/+edit-subscription.
=== modified file 'src/evolution-indicator.c'
--- src/evolution-indicator.c	2010-03-04 05:05:05 +
+++ src/evolution-indicator.c	2010-03-29 21:41:44 +
@@ -292,8 +292,8 @@
 }
 
 trans = g_dngettext (PACKAGE, 
- _(%d New Message), 
- _(%d New Messages),
+ %d New Message, 
+ %d New Messages,
  message_count);
 
 title = g_strdup_printf (trans, message_count);

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Branch ~indicator-applet-developers/evolution-indicator/trunk] Rev 62: 0.2.8

2010-03-30 Thread noreply

revno: 62
tags: 0.2.8
committer: Ted Gould t...@gould.cx
branch nick: trunk
timestamp: Tue 2010-03-30 13:25:29 -0500
message:
  0.2.8
modified:
  configure.ac


--
lp:evolution-indicator
https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk

Your team ayatana-commits is subscribed to branch lp:evolution-indicator.
To unsubscribe from this branch go to 
https://code.launchpad.net/~indicator-applet-developers/evolution-indicator/trunk/+edit-subscription.
=== modified file 'configure.ac'
--- configure.ac	2010-03-04 17:24:23 +
+++ configure.ac	2010-03-30 18:25:29 +
@@ -1,5 +1,5 @@
 AC_PREREQ(2.53)
-AC_INIT(evolution-indicator, 0.2.7, [])
+AC_INIT(evolution-indicator, 0.2.8, [])
 AM_INIT_AUTOMAKE()
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_SRCDIR(src/evolution-indicator.c)

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~ted/indicator-messages/indicator-service-arch into lp:indicator-messages

2010-03-30 Thread Ted Gould
Ted Gould has proposed merging 
lp:~ted/indicator-messages/indicator-service-arch into lp:indicator-messages.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)


Switching indicator-messages over to the libindicator service
architecture that all the other indicators are using.  It adds all kinds
of fun features, but mostly robustness.
-- 
https://code.launchpad.net/~ted/indicator-messages/indicator-service-arch/+merge/22477
Your team ayatana-commits is subscribed to branch lp:indicator-messages.
=== modified file 'configure.ac'
--- configure.ac	2010-03-25 15:16:46 +
+++ configure.ac	2010-03-30 19:00:36 +
@@ -4,7 +4,7 @@
 AC_PREREQ(2.53)
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-messages, 0.3.4)
+AM_INIT_AUTOMAKE(indicator-messages, 0.3.5)
 
 AM_MAINTAINER_MODE
 

=== modified file 'src/indicator-messages.c'
--- src/indicator-messages.c	2010-03-24 22:10:48 +
+++ src/indicator-messages.c	2010-03-30 19:00:36 +
@@ -32,6 +32,7 @@
 #include libindicator/indicator.h
 #include libindicator/indicator-object.h
 #include libindicator/indicator-image-helper.h
+#include libindicator/indicator-service-manager.h
 
 #include dbus-data.h
 #include messages-service-client.h
@@ -52,6 +53,7 @@
 
 struct _IndicatorMessages {
 	IndicatorObject parent;
+	IndicatorServiceManager * service;
 };
 
 GType indicator_messages_get_type (void);
@@ -72,9 +74,13 @@
 static void indicator_messages_finalize   (GObject *object);
 static GtkImage * get_icon(IndicatorObject * io);
 static GtkMenu * get_menu (IndicatorObject * io);
+static void connection_change (IndicatorServiceManager * sm,
+   gboolean connected,
+   gpointer user_data);
 
 G_DEFINE_TYPE (IndicatorMessages, indicator_messages, INDICATOR_OBJECT_TYPE);
 
+/* Initialize the one-timers */
 static void
 indicator_messages_class_init (IndicatorMessagesClass *klass)
 {
@@ -91,26 +97,50 @@
 	return;
 }
 
+/* Build up our per-instance variables */
 static void
 indicator_messages_init (IndicatorMessages *self)
 {
+	/* Default values */
+	self-service = NULL;
+
+	/* Complex stuff */
+	self-service = indicator_service_manager_new_version(INDICATOR_MESSAGES_DBUS_NAME, 1);
+	g_signal_connect(self-service, INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_change), self);
+
+	return;
 }
 
+/* Unref stuff */
 static void
 indicator_messages_dispose (GObject *object)
 {
-G_OBJECT_CLASS (indicator_messages_parent_class)-dispose (object);
+	IndicatorMessages * self = INDICATOR_MESSAGES(object);
+	g_return_if_fail(self != NULL);
+
+	if (self-service != NULL) {
+		g_object_unref(self-service);
+		self-service = NULL;
+	}
+
+	G_OBJECT_CLASS (indicator_messages_parent_class)-dispose (object);
+	return;
 }
 
+/* Destory all memory users */
 static void
 indicator_messages_finalize (GObject *object)
 {
-G_OBJECT_CLASS (indicator_messages_parent_class)-finalize (object);
+
+	G_OBJECT_CLASS (indicator_messages_parent_class)-finalize (object);
+	return;
 }
 
 
 
 /* Functions */
+
+/* Called everytime the attention changes in the service. */
 static void
 attention_changed_cb (DBusGProxy * proxy, gboolean dot, gpointer userdata)
 {
@@ -122,6 +152,7 @@
 	return;
 }
 
+/* Change the icon to whether it should be visible or not */
 static void
 icon_changed_cb (DBusGProxy * proxy, gboolean hidden, gpointer userdata)
 {
@@ -133,16 +164,7 @@
 	return;
 }
 
-static void
-watch_cb (DBusGProxy * proxy, GError * error, gpointer userdata)
-{
-	if (error != NULL) {
-		g_warning(Watch failed!  %s, error-message);
-		g_error_free(error);
-	}
-	return;
-}
-
+/* Callback from getting the attention status from the service. */
 static void
 attention_cb (DBusGProxy * proxy, gboolean dot, GError * error, gpointer userdata)
 {
@@ -155,6 +177,7 @@
 	return attention_changed_cb(proxy, dot, userdata);
 }
 
+/* Change from getting the icon visibility from the service */
 static void
 icon_cb (DBusGProxy * proxy, gboolean hidden, GError * error, gpointer userdata)
 {
@@ -167,44 +190,71 @@
 	return icon_changed_cb(proxy, hidden, userdata);
 }
 
+static guint connection_drop_timeout = 0;
+
+/* Resets the icon to not having messages if we can't get a good
+   answer on it from the service. */
 static gboolean
-setup_icon_proxy (gpointer userdata)
-{
+connection_drop_cb (gpointer user_data)
+{
+	if (main_image != NULL) {
+		indicator_image_helper_update(GTK_IMAGE(main_image), indicator-messages);
+	}
+	connection_drop_timeout = 0;
+	return FALSE;
+}
+
+/* Sets up all the icon information in the proxy. */
+static void 
+connection_change (IndicatorServiceManager * sm, gboolean connected, gpointer user_data)
+{
+	if (connection_drop_timeout != 0) {
+		g_source_remove(connection_drop_timeout);
+		connection_drop_timeout = 0;
+	}
+
+	if (!connected) {
+		/* Ensure that we're not saying there are messages
+		   when we don't 

Re: [Ayatana-commits] [Merge] lp:~ted/indicator-messages/indicator-service-arch into lp:indicator-messages

2010-03-30 Thread Cody Russell
Review: Approve

-- 
https://code.launchpad.net/~ted/indicator-messages/indicator-service-arch/+merge/22477
Your team ayatana-commits is subscribed to branch lp:indicator-messages.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp