Auteur Sujet: QtShortcut-Creator feedback thread  (Lu 6034 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
QtShortcut-Creator feedback thread
« le: 23 mars 2013 à 13:28:26 »
Hi,

I am testing it in a 32bits Ubuntu setup with Openbox. First, I must say it is a very good start for a standalone application. Then, I will list here after a list of things which seem to need improvements.

caymus, if you can find a little time for that, it would be very nice

First launch of the binary:
* The "About" menu says "Linuxvilage" //  you had good idea pointing to the website, however could you add a "l" ? It is "LinuxVillage"

* Then : /home/$user|Desktop/    // this does not work if the system has "Bureau" or any other name for Desktop, according to the language. Could you do something like this ?

Not write "/home/$user" because that's geeky, just something such as "Shortcut location" and in the choices, instead of "Desktop" add a field where people would write their own location choice ?

* The gui does not yet display the icon chosen, do you think this is a feature you might add ?

* This is the desktop file I produced, when choosing .local/share/applicatiions:
Citer
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=QtShortcut
Name[en_US]=QtShortcut
Icon=shortcut48.png
Exec=Qt-shortcut-creator
Comment[en_US]=Allows creating new menu entries
Categories=Settings
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=QtShortcut
Name[en_US]=QtShortcut
Icon=shortcut48.png
Exec=Qt-shortcut-creator
Comment[en_US]=Allows creating new menu entries
Categories=Settings

I think adding [en_US] in the "Name" and in the "Comment" lines is not necessary, because the default is always English anyhow. We usually add the iso code for all the other languages.

About the name of the program, I think djohnston gave a good idea : just "Qtshortcut" is fine, and about the name of the binary, would it be ok for you to name it "qtshortcut", without any high case ?

* Last, if you can do more or less all which is above, would you know how to make a pot file ? :)

All this, if you feel like continuing to work on it, of course...

Good leaders being scarce, following yourself is allowed.

Hors ligne caymus

  • Néophyte
  • *
  • Messages: 13
Re : QtShortcut-Creator feedback thread
« Réponse #1 le: 24 mars 2013 à 00:12:41 »
First launch of the binary:
* The "About" menu says "Linuxvilage" //  you had good idea pointing to the website, however could you add a "l" ? It is "LinuxVillage"

done

* Then : /home/$user|Desktop/    // this does not work if the system has "Bureau" or any other name for Desktop, according to the language. Could you do something like this ?

done

Not write "/home/$user" because that's geeky, just something such as "Shortcut location" and in the choices, instead of "Desktop" add a field where people would write their own location choice ?

done

* The gui does not yet display the icon chosen, do you think this is a feature you might add ?

this is the main challenge, but something is made, the main difficulty is to do a custom file browser with preview implemented, must take some time

* This is the desktop file I produced, when choosing .local/share/applicatiions: (duplicate entry) ---->

done

I think adding [en_US] in the "Name" and in the "Comment" lines is not necessary, because the default is always English anyhow. We usually add the iso code for all the other languages.

(I had not planned that peoples can validate 2 * on the same file, so now, if file exist, flush all & repopulate the file...)

adding [en_US] in the "Name" and in the "Comment" lines is not necessary,

I dont know, was what did lxshortcut to

About the name of the program, I think djohnston gave a good idea : just "Qtshortcut" is fine, and about the name of the binary, would it be ok for you to name it "qtshortcut", without any high case ?

qt or Qt + something is ok, not QT
already used

« Modifié: 24 mars 2013 à 03:58:51 par djohnston »

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : QtShortcut-Creator feedback thread
« Réponse #2 le: 24 mars 2013 à 00:40:06 »
Citer
* The gui does not yet display the icon chosen, do you think this is a feature you might add ?
this is the main challenge, but something is made, the main difficulty is to do a custom file browser with preview implemented, must take some time

Hi,

number of previous quotes is limited to "1" on the forum, maybe you would want to answer after the quote... not inside. :)

About the filebrowser, would it help you to know about a Qt file manager which has been talked about here?
http://linuxvillage.net/index.php/topic,209.0.html

Some QT apps I'm trying -
  • Filemanager - qtFM
  • Browser - Qupzilla
  • Text editor - Juffed
qtFM works well and shows mounted devices as a bookmark.  It is also easy to write custom action as in Thunar.  Qupzilla seems to be coping with everything I'm throwing at it - occasional hiccup with resizing flash video in Youtube,  Juffed is lightning fast and has full formatting.

never know, maybe would you find pieces of code to reuse from there ?

Thanks a lot for your efforts!

PS: I just checked, lxshortcut didn't add iso code to the "Name=" and "Comment=" lines when I used it. (Recently created, lxshorcut.deskop which could not work, and previously, tint2.desktop, lxpanel.desktop, volumeicon-alsa.desktop, and even a pcmanfm-desktop.desktop which launches the desktop management feature from pcmanfm, for the OBUbuntu spins).


« Modifié: 24 mars 2013 à 00:50:44 par mélodie »
Good leaders being scarce, following yourself is allowed.

Hors ligne caymus

  • Néophyte
  • *
  • Messages: 13
Re : QtShortcut-Creator feedback thread
« Réponse #3 le: 24 mars 2013 à 01:07:30 »
Thx, yes i already know qtfm

~4000 lignes of code to dissect :)

I have many docs & pieces of code, about all that but this is not a small job to make a custom file browser, that is why I have said that this would be the main job and it may take time. 20-60 hours ---> 20 - 30 days maybe to read docs, libs & experiment, repeat, modify, debug.
maybe alot less with luck on finding about the unknown magical function & trick, who make your job a lot easier, shorter ^^

PS:  Can you show me ideal .desktop as it is easy to add or remove entries, it is text.

i mean about this:
Terminal=
MimeType=
GenericName=
GenericName[fr]=

it varies so much from a window manager or application to another
« Modifié: 24 mars 2013 à 01:25:22 par caymus »

djohnston

  • Invité
Re : Re : QtShortcut-Creator feedback thread
« Réponse #4 le: 24 mars 2013 à 03:57:57 »
number of previous quotes is limited to "1" on the forum, maybe you would want to answer after the quote... not inside. :)

FIXED

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : QtShortcut-Creator feedback thread
« Réponse #5 le: 24 mars 2013 à 13:07:32 »
Hi, here is a desktop file:

Citer
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=volumeicon-alsa
Exec=/usr/bin/volumeicon

this one is only to put in the autostart directory, it does not have all entries to be sitting in a regular menu. Here is another one:

Citer
[Desktop Entry]
Encoding=UTF-8
Name=dxtime
Comment=small program for time tracking
Exec=dxtime
Icon=dxtime
Terminal=false
Type=Application
Categories=Utility;

this one is in the menus, in the Utility category (fr: Accessoires), and could be copied as is in a autostart directory, or on the desktop of the user. I think this one would be the good example.

djohnston, thanks, but you didn't need to worry. :)

PS: we can also have desktop files which are links to something, such as a link to a web page, ie:

Citer
[Desktop Entry]
Encoding=UTF-8
Icon=text-html
Type=Link
Name=Multi-level Navigation Plugin
URL=http://downloads.wordpress.org/plugin/multi-level-navigation-plugin.zip
[InternetShortcut]
URL=http://downloads.wordpress.org/plugin/multi-level-navigation-plugin.zip

So this time "Type" is not application anymore, but Link, and clicking on it will open a web page with the "x-www-browser" application. The icon is default set to text-html by the Firefox plugin "SaveLink" and of course I could change it to something else.

Just to say Type can have Applications as argument, or Link ?


« Modifié: 24 mars 2013 à 13:14:05 par mélodie »
Good leaders being scarce, following yourself is allowed.

Hors ligne caymus

  • Néophyte
  • *
  • Messages: 13
Re : QtShortcut-Creator feedback thread
« Réponse #6 le: 24 mars 2013 à 19:45:21 »
Yes, here how this thing work:



//Create the .desktop file

    QString place = ui->comboBox_path->currentText();   //a combobox editable who store path
    QString namedeskfile = ui->lineEdit->text(); //text entry who store name of the .desktop
    QString categorie = ui->comboBox_categ->currentText(); //Non editable combox with various categories entry
    QString name = ui->lineEdit_Name->text(); //text entry box, name into .desktop
    QString comment = ui->lineEdit_Comment->text();   //text entry box, comment
    QString icon = ui->lineEdit_Icon->text();    //text entry box, images path
    QString app = ui->lineEdit_App->text();    //text entry box, executables path

    QFile file(place+"/"+namedeskfile+".desktop");  //QFile manage file manipulation, something like "nano" + (place+"/"+namedeskfile+".desktop") and store all into file from QFile file

    if (file.exists())
    {
        file.remove();  // easy to understand
    }

    file.open(QIODevice::ReadWrite | QIODevice::Text | QIODevice::Append); // file variable is open in read write mode and next
    QTextStream out(&file); // put out value into file value
    out << "[Desktop Entry]\n" << "Encoding=UTF-8\n" << "Type=Application\n" << "Name=" << name << "\n"  << "Icon=" << icon << "\n" << "Exec=" << app << "\n" << "Comment=" << comment << "\n" << "Categories=" << categorie << endl; //"this is static text", "\n" = return, << add something else.

    file.close()


This is the easy part made in 30 minutes, but i need to know all what you need into your file & sort the different types usages and their  compatible/incompatibles options, QString values can be turned on or off by switchs , but i need a good happening everywhere .desktop structure.

Wrong options into the .desktop may make it incompatible inoperative with a particular window manager.

the 2nd that you mention, mélodie is the most compatible, the 3rd I've never tried but it is also possible to make.

By cons there are many other options, but it is likely to be too specific.
« Modifié: 24 mars 2013 à 19:58:44 par caymus »

Hors ligne melodie

  • Administrateur
  • Membre Héroïque
  • *****
  • Messages: 1774
    • Citrotux
Re : QtShortcut-Creator feedback thread
« Réponse #7 le: 24 mars 2013 à 20:33:45 »
Hi,

Having the second one would be a great thing and a real progress over the actual Lxshortcut, really!

Good leaders being scarce, following yourself is allowed.

konaexpress

  • Invité
Re : QtShortcut-Creator feedback thread
« Réponse #8 le: 25 mars 2013 à 00:03:33 »
Wow guy, you are doing a nice job with this idea. ;D