[Amsn-devel] Re: [Amsn-commits] amsn-extras/plugins/desktop_integration desktop_integration.tcl,1.6,1.7

2006-01-02 Thread Sander Hoentjen
So.. what are the differences? What can it do now that it couldn't do
before?

On Mon, 2006-01-02 at 14:09 +, Karel Demeyer wrote:
 Update of /cvsroot/amsn/amsn-extras/plugins/desktop_integration
 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5545
 
 Modified Files:
   desktop_integration.tcl 
 Log Message:
 should work now though we don't have the dilaog to ask for changes yet
 
 Index: desktop_integration.tcl
 ===
 RCS file: 
 /cvsroot/amsn/amsn-extras/plugins/desktop_integration/desktop_integration.tcl,v
 retrieving revision 1.6
 retrieving revision 1.7
 diff -C2 -d -r1.6 -r1.7
 *** desktop_integration.tcl   2 Jan 2006 00:32:32 -   1.6
 --- desktop_integration.tcl   2 Jan 2006 14:09:04 -   1.7
 ***
 *** 33,36 
 --- 33,44 
   variable renamed_messagebox_proc
   
 + variable users_filemanager
 + variable users_openfilecommand
 + variable users_browser
 + variable users_mailcommand
 + variable users_usesnack
 + variable users_soundcommand
 + variable users_notifyYoffset
 + 
   
   if { $loaded == 1 } {
 ***
 *** 39,44 
   
   ::plugins::RegisterPlugin $plugin_name
 ! #here we need a good thing, I'm waiting for the solution 
 youness was gonna tell me when I went to sleep ;)
 ! ::plugins::RegisterEvent $plugin_name PluginFullyLoaded 
 checks_when_loaded
   
   array set config {
 --- 47,51 
   
   ::plugins::RegisterPlugin $plugin_name
 ! 
   
   array set config {
 ***
 *** 56,64 
   set current_desktop [WhichDesktop]
   
   # If no program is installed, the plugin cannot work
   if {$current_desktop == noone} {
   # Show info: the plugin cannot be installed
   plugins_log $plugin_name User has neither kdialog nor 
 zenity installed. Cannot use the plugin
 ! msg_box Sorry, you have neither \'kdialog\' nor 
 \'zenity\' installed. Please, install one of them in order to use this 
 plugin.
   # Unload the plugin
   ::plugins::GUI_Unload
 --- 63,90 
   set current_desktop [WhichDesktop]
   
 + 
 + #before altering, save the settings the user had before the 
 plugin was loaded; even though maybe we don't change it .. it's easier for 
 now ;)
 + set users_filemanager [::config::getKey filemanager]
 + set users_openfilecommand [::config::getKey openfilecommand]
 + set users_browser [::config::getKey browser]
 + set users_mailcommand [::config::getKey mailcommand]
 + set users_usesnack [::config::getKey usesnack]
 + set users_soundcommand [::config::getKey soundcommand]
 + set users_notifyYoffset [::config::getKey notifyYoffset]
 + 
 + 
 + #TODO: find out how to replace Desktop Integration with 
 $plugin_name
 + if {[info exists {::Desktop Integration_cfg(showsetupdialog)}] 
 
 +[set {::Desktop Integration_cfg(showsetupdialog)}] == 1  
 ($current_desktop != noone)} {
 + setup_dialog
 + }
 + 
 + 
   # If no program is installed, the plugin cannot work
   if {$current_desktop == noone} {
   # Show info: the plugin cannot be installed
   plugins_log $plugin_name User has neither kdialog nor 
 zenity installed. Cannot use the plugin
 ! msg_box Sorry, you have neither \'kdialog\' nor 
 \'zenity\' installed. This plugin won't do much for you.
 ! #no unloading as we want to use the other options ?
   # Unload the plugin
   ::plugins::GUI_Unload
 ***
 *** 69,73 
   }
   
 ! 
   # CHANGE: ::chooseFileDialog - KchooseFileDialog
   if { [info proc ::chooseFileDialog] == ::chooseFileDialog} {
 --- 95,99 
   }
   
 ! 
   # CHANGE: ::chooseFileDialog - KchooseFileDialog
   if { [info proc ::chooseFileDialog] == ::chooseFileDialog} {
 ***
 *** 77,81 
   }
   }
 ! 
   # CHANGE: ::tk_getSaveFile - KgetSaveFile
   if { [info proc ::tk_getSaveFile] == ::tk_getSaveFile} {
 --- 103,108 
   }
   }
 ! 
 ! 
   # CHANGE: ::tk_getSaveFile - KgetSaveFile
   if { [info proc ::tk_getSaveFile] == ::tk_getSaveFile} {
 ***
 *** 94,97 
 --- 121,125 
   }
   
 + 
   # Initialize the blocking variable if it's not yet set
 

Re: [Amsn-devel] Re: [Amsn-commits] amsn-extras/plugins/desktop_integration desktop_integration.tcl,1.6,1.7

2006-01-02 Thread Karel Demeyer
It had code that wasn't used yet ... now on first load, well, now still
on every load of the plugin, it changes your settings (a lot more
settings are changed for gnome then 2 days ago ;))
Now I only need to add a dialog to ask the user if he wants the changes
to be done and if he wants to have this question re-asked every time.
otherwise it disables the option (still commented now)

Karel.


Op ma, 02-01-2006 te 15:16 +0100, schreef Sander Hoentjen:
 So.. what are the differences? What can it do now that it couldn't do
 before?
 
 On Mon, 2006-01-02 at 14:09 +, Karel Demeyer wrote:
  Update of /cvsroot/amsn/amsn-extras/plugins/desktop_integration
  In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5545
  
  Modified Files:
  desktop_integration.tcl 
  Log Message:
  should work now though we don't have the dilaog to ask for changes yet
  
  Index: desktop_integration.tcl
  ===
  RCS file: 
  /cvsroot/amsn/amsn-extras/plugins/desktop_integration/desktop_integration.tcl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -C2 -d -r1.6 -r1.7
  *** desktop_integration.tcl 2 Jan 2006 00:32:32 -   1.6
  --- desktop_integration.tcl 2 Jan 2006 14:09:04 -   1.7
  ***
  *** 33,36 
  --- 33,44 
  variable renamed_messagebox_proc

  +   variable users_filemanager
  +   variable users_openfilecommand
  +   variable users_browser
  +   variable users_mailcommand
  +   variable users_usesnack
  +   variable users_soundcommand
  +   variable users_notifyYoffset
  + 

  if { $loaded == 1 } {
  ***
  *** 39,44 

  ::plugins::RegisterPlugin $plugin_name
  !   #here we need a good thing, I'm waiting for the solution 
  youness was gonna tell me when I went to sleep ;)
  !   ::plugins::RegisterEvent $plugin_name PluginFullyLoaded 
  checks_when_loaded
  
  array set config {
  --- 47,51 

  ::plugins::RegisterPlugin $plugin_name
  ! 
  
  array set config {
  ***
  *** 56,64 
  set current_desktop [WhichDesktop]
  
  # If no program is installed, the plugin cannot work
  if {$current_desktop == noone} {
  # Show info: the plugin cannot be installed
  plugins_log $plugin_name User has neither kdialog nor 
  zenity installed. Cannot use the plugin
  !   msg_box Sorry, you have neither \'kdialog\' nor 
  \'zenity\' installed. Please, install one of them in order to use this 
  plugin.
  # Unload the plugin
  ::plugins::GUI_Unload
  --- 63,90 
  set current_desktop [WhichDesktop]
  
  + 
  +   #before altering, save the settings the user had before the 
  plugin was loaded; even though maybe we don't change it .. it's easier for 
  now ;)
  +   set users_filemanager [::config::getKey filemanager]
  +   set users_openfilecommand [::config::getKey openfilecommand]
  +   set users_browser [::config::getKey browser]
  +   set users_mailcommand [::config::getKey mailcommand]
  +   set users_usesnack [::config::getKey usesnack]
  +   set users_soundcommand [::config::getKey soundcommand]
  +   set users_notifyYoffset [::config::getKey notifyYoffset]
  + 
  + 
  +   #TODO: find out how to replace Desktop Integration with 
  $plugin_name
  +   if {[info exists {::Desktop Integration_cfg(showsetupdialog)}] 
  
  +  [set {::Desktop Integration_cfg(showsetupdialog)}] == 1  
  ($current_desktop != noone)} {
  +   setup_dialog
  +   }
  + 
  + 
  # If no program is installed, the plugin cannot work
  if {$current_desktop == noone} {
  # Show info: the plugin cannot be installed
  plugins_log $plugin_name User has neither kdialog nor 
  zenity installed. Cannot use the plugin
  !   msg_box Sorry, you have neither \'kdialog\' nor 
  \'zenity\' installed. This plugin won't do much for you.
  ! #no unloading as we want to use the other options ?
  # Unload the plugin
  ::plugins::GUI_Unload
  ***
  *** 69,73 
  }
  
  !   
  # CHANGE: ::chooseFileDialog - KchooseFileDialog
  if { [info proc ::chooseFileDialog] == ::chooseFileDialog} {
  --- 95,99 
  }
  
  ! 
  # CHANGE: ::chooseFileDialog - KchooseFileDialog
  if { [info proc ::chooseFileDialog] == ::chooseFileDialog} {
  ***
  *** 77,81 
  }
  }
  !   
  # CHANGE: 

Re: [Amsn-devel] Re: [Amsn-commits] amsn-extras/plugins/desktop_integration desktop_integration.tcl,1.6,1.7

2006-01-02 Thread Vivia Nikolaidou

 It had code that wasn't used yet ... now on first load, well, now still
 on every load of the plugin, it changes your settings (a lot more
 settings are changed for gnome then 2 days ago ;))

What settings? And how about KDE? :D


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel


Re: [Amsn-devel] Re: [Amsn-commits] amsn-extras/plugins/desktop_integration desktop_integration.tcl,1.6,1.7

2006-01-02 Thread Youness Alaoui
hehe, well, if you use the $plugin_name variable, then you don't need the  
{ } because if you use the { }, it will not expand your variable name, and  
the var you'll be looking at will be ${${plugin_name}_cfg} (as it is.. the  
variable name would itself contain the '$' sign...

so just do it this way :
if { [info exists ${plugin_name}_cfg(first_time)] ...
 set ft [set ${plugin_name}_cfg(first_time)]
}
that should work.. I think..
anyways!
btw. I looked at the commit diff but didn't noticed you added the _cfg  
trick... I guess I just missed it!


KKRT

On Mon, 02 Jan 2006 10:01:48 -0500, Karel Demeyer [EMAIL PROTECTED]  
wrote:



Op ma, 02-01-2006 te 09:45 -0500, schreef Youness Alaoui:

did you try my ${Destop Integration_cfg} tip ?
KKRT


It's incorporated ... I wanted to use the $plugin_name var to make it
look clean but I couldn't find out the right way to use the {'s etc .. I
tried several ways though.

Karel.



On Mon, 02 Jan 2006 09:29:49 -0500, Karel Demeyer [EMAIL PROTECTED]
wrote:

 It had code that wasn't used yet ... now on first load, well, now  
still

 on every load of the plugin, it changes your settings (a lot more
 settings are changed for gnome then 2 days ago ;))
 Now I only need to add a dialog to ask the user if he wants the  
changes

 to be done and if he wants to have this question re-asked every time.
 otherwise it disables the option (still commented now)

 Karel.


 Op ma, 02-01-2006 te 15:16 +0100, schreef Sander Hoentjen:
 So.. what are the differences? What can it do now that it couldn't do
 before?

 On Mon, 2006-01-02 at 14:09 +, Karel Demeyer wrote:
  Update of /cvsroot/amsn/amsn-extras/plugins/desktop_integration
  In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5545
 
  Modified Files:
desktop_integration.tcl
  Log Message:
  should work now though we don't have the dilaog to ask for changes  
yet

 
  Index: desktop_integration.tcl
  ===
  RCS file:
  
/cvsroot/amsn/amsn-extras/plugins/desktop_integration/desktop_integration.tcl,v

  retrieving revision 1.6
  retrieving revision 1.7
  diff -C2 -d -r1.6 -r1.7
  *** desktop_integration.tcl   2 Jan 2006 00:32:32 -   1.6
  --- desktop_integration.tcl   2 Jan 2006 14:09:04 -   1.7
  ***
  *** 33,36 
  --- 33,44 
variable renamed_messagebox_proc
 
  + variable users_filemanager
  + variable users_openfilecommand
  + variable users_browser
  + variable users_mailcommand
  + variable users_usesnack
  + variable users_soundcommand
  + variable users_notifyYoffset
  +
 
if { $loaded == 1 } {
  ***
  *** 39,44 
 
::plugins::RegisterPlugin $plugin_name
  ! 		#here we need a good thing, I'm waiting for the solution  
youness

 was gonna tell me when I went to sleep ;)
  ! ::plugins::RegisterEvent $plugin_name PluginFullyLoaded
 checks_when_loaded

array set config {
  --- 47,51 
 
::plugins::RegisterPlugin $plugin_name
  !

array set config {
  ***
  *** 56,64 
set current_desktop [WhichDesktop]

# If no program is installed, the plugin cannot work
if {$current_desktop == noone} {
# Show info: the plugin cannot be installed
plugins_log $plugin_name User has neither 
kdialog nor zenity
 installed. Cannot use the plugin
  ! msg_box Sorry, you have neither \'kdialog\' nor 
\'zenity\'
 installed. Please, install one of them in order to use this plugin.
# Unload the plugin
::plugins::GUI_Unload
  --- 63,90 
set current_desktop [WhichDesktop]

  +
  + #before altering, save the settings the user had before 
the
 plugin was loaded; even though maybe we don't change it .. it's  
easier

 for now ;)
  + set users_filemanager [::config::getKey filemanager]
  + set users_openfilecommand [::config::getKey 
openfilecommand]
  + set users_browser [::config::getKey browser]
  + set users_mailcommand [::config::getKey mailcommand]
  + set users_usesnack [::config::getKey usesnack]
  + set users_soundcommand [::config::getKey soundcommand]
  + set users_notifyYoffset [::config::getKey notifyYoffset]
  +
  +
  + #TODO: find out how to replace Desktop Integration with
 $plugin_name
  + 		if {[info exists {::Desktop Integration_cfg(showsetupdialog)}]  


  +[set {::Desktop 

Re: [Amsn-devel] Re: [Amsn-commits] amsn-extras/plugins/desktop_integration desktop_integration.tcl,1.6,1.7

2006-01-02 Thread Karel Demeyer
Op ma, 02-01-2006 te 10:03 -0500, schreef Youness Alaoui:
 hehe, well, if you use the $plugin_name variable, then you don't need the  
 { } because if you use the { }, it will not expand your variable name, and  
 the var you'll be looking at will be ${${plugin_name}_cfg} (as it is.. the  
 variable name would itself contain the '$' sign...
 so just do it this way :
 if { [info exists ${plugin_name}_cfg(first_time)] ...
   set ft [set ${plugin_name}_cfg(first_time)]
 }
 that should work.. I think..
 anyways!
 btw. I looked at the commit diff but didn't noticed you added the _cfg  
 trick... I guess I just missed it!


Ah well .. maybe I'll try it next time I thouch it .. now I'm off.  It
was in the first commit (did 2 commits on that file):
+   #TODO: find out how to replace Desktop Integration
with $plugin_name
+   if {[info exists {::Desktop
Integration_cfg(showsetupdialog)}] 
+  [set {::Desktop Integration_cfg(showsetupdialog)}] ==
1  ($current_desktop != noone)} {
+   setup_dialog
+   }

Karel.

 KKRT
 
 On Mon, 02 Jan 2006 10:01:48 -0500, Karel Demeyer [EMAIL PROTECTED]  
 wrote:
 
  Op ma, 02-01-2006 te 09:45 -0500, schreef Youness Alaoui:
  did you try my ${Destop Integration_cfg} tip ?
  KKRT
 
  It's incorporated ... I wanted to use the $plugin_name var to make it
  look clean but I couldn't find out the right way to use the {'s etc .. I
  tried several ways though.
 
  Karel.
 
 
  On Mon, 02 Jan 2006 09:29:49 -0500, Karel Demeyer [EMAIL PROTECTED]
  wrote:
 
   It had code that wasn't used yet ... now on first load, well, now  
  still
   on every load of the plugin, it changes your settings (a lot more
   settings are changed for gnome then 2 days ago ;))
   Now I only need to add a dialog to ask the user if he wants the  
  changes
   to be done and if he wants to have this question re-asked every time.
   otherwise it disables the option (still commented now)
  
   Karel.
  
  
   Op ma, 02-01-2006 te 15:16 +0100, schreef Sander Hoentjen:
   So.. what are the differences? What can it do now that it couldn't do
   before?
  
   On Mon, 2006-01-02 at 14:09 +, Karel Demeyer wrote:
Update of /cvsroot/amsn/amsn-extras/plugins/desktop_integration
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5545
   
Modified Files:
  desktop_integration.tcl
Log Message:
should work now though we don't have the dilaog to ask for changes  
  yet
   
Index: desktop_integration.tcl
===
RCS file:

  /cvsroot/amsn/amsn-extras/plugins/desktop_integration/desktop_integration.tcl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** desktop_integration.tcl   2 Jan 2006 00:32:32 -   1.6
--- desktop_integration.tcl   2 Jan 2006 14:09:04 -   1.7
***
*** 33,36 
--- 33,44 
  variable renamed_messagebox_proc
   
+ variable users_filemanager
+ variable users_openfilecommand
+ variable users_browser
+ variable users_mailcommand
+ variable users_usesnack
+ variable users_soundcommand
+ variable users_notifyYoffset
+
   
  if { $loaded == 1 } {
***
*** 39,44 
   
  ::plugins::RegisterPlugin $plugin_name
! #here we need a good thing, I'm waiting for the 
solution  
  youness
   was gonna tell me when I went to sleep ;)
! ::plugins::RegisterEvent $plugin_name PluginFullyLoaded
   checks_when_loaded
  
  array set config {
--- 47,51 
   
  ::plugins::RegisterPlugin $plugin_name
!
  
  array set config {
***
*** 56,64 
  set current_desktop [WhichDesktop]
  
  # If no program is installed, the plugin cannot work
  if {$current_desktop == noone} {
  # Show info: the plugin cannot be installed
  plugins_log $plugin_name User has neither 
kdialog nor zenity
   installed. Cannot use the plugin
! msg_box Sorry, you have neither \'kdialog\' 
nor \'zenity\'
   installed. Please, install one of them in order to use this plugin.
  # Unload the plugin
  ::plugins::GUI_Unload
--- 63,90 
  set current_desktop [WhichDesktop]
  
+
+ #before altering, save the settings the user had before 
the
   plugin was loaded; even though maybe we don't change it .. it's  
  easier
   for now ;)
+ set users_filemanager [::config::getKey filemanager]
+ set