Questions En > Help requests

xfce4-notifyd and modified script - help!!

<< < (2/3) > >>

djohnston:

--- Citation de: Taco.22 le 02 juin 2013 à 17:57:12 ---Where I am stumped is that I can't find the script that xfce4-notifyd is displaying for the "network up" pop-up.

--- Fin de citation ---
I don't think the popup messages come from a "script", per se. I believe the NetworkManager messages are contained in the /usr/share/locale/en_GB/LC_MESSAGES/NetworkManager.mo file. Do a cat on that file and you'll see it is mixed binary and ASCII text. (Your directory may be en_AU.) Look in the directory and you'll see .mo files for aptdaemon, bleachbit, etc.

Gettext and other tools are used for working with .mo files. They are loosely associated with .po files, I believe. You may have already used the xfce4-notifyd-config tool.


--- Citer ---Run xfce4-notifyd-config to display the settings dialog. There aren't any other tunables; if you do not see it in the settings dialog, it's not changeable.
--- Fin de citation ---
That's all I've been able to glean from my XFCE installation.

melodie:

--- Citation de: djohnston le 03 juin 2013 à 00:06:58 ---They are loosely associated with .po files, I believe.
--- Fin de citation ---

po files are the text version, mo files the compiled version. It all starts with a pot file which is the model for all the po files to come.

We translated and kept an information from pinoc here, and the original link to here: Howto translate. In pinoc's how-to among else you will find a good summary of the process and some useful commands to get a po file out of a mo file and redo a mo file from a po file, which allows easy modification of the content of a given mo file, if you need to do a fast test, and don't want to bother to get the original pot file from the sources, for instance.

Taco.22:
Well that certainly opened a can of worms!!!


--- Citation de: mimas ---Network-manager-applet doesn't use scripts to display notifications; the calls to the notify deamon are hardcoded.
I have checked in the code source.
--- Fin de citation ---
No wonder I couldn't find any scripts!


--- Citation de: melodie ---I stopped using the popping notifications because I didn't like it when it was hiding a part of the screen on the laptop.
--- Fin de citation ---
Using xfce4-notifyd-config allows one to set the theme, position and duration of a pop-up.  I don't think this can be done with notification-daemon from gnome.  Notifyosd is not available for Debian, but it simply gives configuration where gnome doesn't have it.


--- Citation de: melodie ---po files are the text version, mo files the compiled version. It all starts with a pot file which is the model for all the po files to come.
--- Fin de citation ---

--- Citation de: djohnston ---Gettext and other tools are used for working with .mo files. They are loosely associated with .po files, I believe.
--- Fin de citation ---
I checked out the links and I'm not going there!!  This is even worse than dealing with a cpio.

Typical gnome stuff tying up things that should be straightforward and editable.  I guess the pop-up, if it stays, will be what it is.  Shame - would have been nice to have included some extra bits but the effort, if achievable, doesn't warrant the work.  I can't even get rid of the "Don't show this message again" button.  A classic example of how to over-complicate things.  The only other thought is that this is a very stripped down version of network-manager-gnome, so maybe something is missing - doesn't matter though as this really is only floss. 



melodie:

--- Citation de: Taco.22 le 03 juin 2013 à 02:22:01 ---I checked out the links and I'm not going there!!  This is even worse than dealing with a cpio.
--- Fin de citation ---

Either or is not a problem as long as you have the magic formula written in your grimoire. :)


How to convert a « mo » file to a « po » file


--- Code: ---msgunfmt file.mo -o file.po
--- Fin du code ---

To convert a « po » text file which can be edited, to a « mo » compiled version of the file do:


--- Code: ---msgfmt file.po -o file.mo
--- Fin du code ---

(Replace "file" by the file name, I say just in case someone who does not know comes by).

BTW I have saved the formula for cpio as well, if you ever need it just ask, it's on the pclos-fr wiki. :D


PS: about Notify-OSD (perhaps instead of Xfce notifyd) this might interest you:
http://crunchbang.org/forums/viewtopic.php?id=15819

Taco.22:
This has turned out to be one of my most complicated and frustrating forays into the Land of Linux.  Who would have thought that something so seemingly simple could prove to be such a herculean task!

I bit the bullet, installed gettext and can now translate mo to po and back again.  A mighty useful skill I could add!!  Didn't help though.  Tackled a locale file for nm but it proved to be very large and way over my head.  Besides, what about all the other languages?!?  It's not the source of the dialogue and as mimas said, it's in the code itself.

I have been playing around with dunst as a simple notification daemon but it is way worse than conky to configure, once you actually find an rc for the dratted thing!  Xfce4-notifyd is easy to use and reconfigure, and uses gtk themes that are easy to edit.  It works well and is better than notify-osd, plus it is in the Debian repo.

The big issue in the end is not being able to get access to whatever it is that drives the dialogue in the network pop-up.  That was the only reason for this exercise - to find it and modify it.  Seems that that is verging on the impossible, unless one is capable of modifying source code.  I'm not!

Anyway, thanks for all the suggestions.  If nothing else it was a learning curve ... of sorts!!

Navigation

[0] Index des messages

[#] Page suivante

[*] Page précédente

Utiliser la version classique