Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Desktop Command Execution Widget scripts

    Reply
    Page 8 of 42 | Prev |   6     7   8   9     10   18 | Next | Last
    fred123 | # 71 | 2010-01-27, 03:33 | Report

    Yes its 0.6.

    I updated it through app manager a couple of hours ago. Just tried uninstalling and reinstalling, but it still behaves the same.

    I'm running usa pr1.1 firmware.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    cpscotti | # 72 | 2010-01-27, 08:07 | Report

    Originally Posted by fred123 View Post
    Yes its 0.6.

    I updated it through app manager a couple of hours ago. Just tried uninstalling and reinstalling, but it still behaves the same.

    I'm running usa pr1.1 firmware.
    So... this is weird but try rebooting. Or first try removing the app, the go back to the desktops... wander around a little bit and theeen install again...
    What might be happening is that maemo is still using the old .desktop file.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    No!No!No!Yes! | # 73 | 2010-01-27, 10:17 | Report

    Originally Posted by cpscotti View Post
    Hi!
    I just read most of the brainstorm and it really IS close to my widget! =]
    Some observations: instead of multiple lines, we opted for multiple widgets with user-defined width. The idea is to output short info there.

    About an editor with syntax highlight .. well.. I believe you can simply use whatever editor you like to create your script (e.g. script.sh) and then just call that script from the widget (e.g. /path2script/script.sh).

    By text size you mean font? Well.. anyway.. this app is VERY young.. not even in extras yet.. maybe with some more time..
    Hi,
    I joggled a bit with the source code from release 0.6 and I ended up with this (commands are just examples to show feasibility)





    I hope developer could integrate this in next release if not already brewing.

    Modified code desktop-cmd-exec.0.601.c is commented at end of line with
    PHP Code:
    //AP 
    Like this:
    PHP Code:
            gdouble widthRatio;
            
    gdouble heightRatio;//AP 

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to No!No!No!Yes! For This Useful Post:
    cpscotti, iKneaDough, jakiman, qwerty12

     
    cpscotti | # 74 | 2010-01-27, 10:22 | Report

    Originally Posted by No!No!No!Yes! View Post
    Hi,
    I joggled a bit with the source code from release 0.6 and I ended up with this (commands are just examples to show feasibility)





    I hope developer could integrate this in next release if not already brewing.

    Modified code desktop-cmd-exec.0.601.c is commented at end of line with
    PHP Code:
    //AP 
    PHP Code:
            gdouble widthRatio;
            
    gdouble heightRatio;//AP 
    =]]
    I'll sure add it to the main source tonight!! (with proper credits)
    Seems my code is not THAAT bad then.. lol!


    Thanks!
    Like this:

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to cpscotti For This Useful Post:
    iKneaDough, jakiman, qwerty12, rolfok

     
    No!No!No!Yes! | # 75 | 2010-01-27, 11:00 | Report

    Originally Posted by cpscotti View Post
    =]]
    I'll sure add it to the main source tonight!! (with proper credits)
    Seems my code is not THAAT bad then.. lol!


    Thanks!
    Like this:
    I confess I liked the timer Beard-Trick ("Barbatrucco")!!!
    And learnt a lot by your coding!!!


    PHP Code:
    .........snip.........
        
    gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*0.118), SIZE_HEIGHT_LINE);

        
    g_timeout_add (500, (GSourceFunc)desktop_cmd_exec_resize_hack, self);
    ........
    snip.........

    gboolean desktop_cmd_exec_resize_hack(DesktopCmdExec *self)
    {
    //     g_warning("HACK");
        
    if(self->priv->widgetID != NULL)
        {
            
    desktop_cmd_exec_read_settings (self);
            
    desktop_cmd_exec_update_content (self);

    //g_warning("W %d H %d",(int)(SIZE_WIDTH_ALL*self->priv->widthRatio),(int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
    //        gtk_widget_set_size_request (GTK_WIDGET (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), SIZE_HEIGHT_LINE);//AP
    //        gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), SIZE_HEIGHT_LINE);//AP
            
    gtk_widget_set_size_request (GTK_WIDGET (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), (int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
            
    gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), (int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
        
    }
    //     else
    //     {
    //         g_warning("HACK unsuccessful");
    //     }

        
    return FALSE;
    }
    .........
    snip......... 

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
    iKneaDough

     
    cpscotti | # 76 | 2010-01-27, 11:09 | Report

    Originally Posted by No!No!No!Yes! View Post
    I confess I liked the timer Beard-Trick ("Barbatrucco")!!!
    And learnt a lot by your coding!!!


    PHP Code:
    .........snip.........
        
    gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*0.118), SIZE_HEIGHT_LINE);

        
    g_timeout_add (500, (GSourceFunc)desktop_cmd_exec_resize_hack, self);
    ........
    snip.........

    gboolean desktop_cmd_exec_resize_hack(DesktopCmdExec *self)
    {
    //     g_warning("HACK");
        
    if(self->priv->widgetID != NULL)
        {
            
    desktop_cmd_exec_read_settings (self);
            
    desktop_cmd_exec_update_content (self);

    //g_warning("W %d H %d",(int)(SIZE_WIDTH_ALL*self->priv->widthRatio),(int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
    //        gtk_widget_set_size_request (GTK_WIDGET (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), SIZE_HEIGHT_LINE);//AP
    //        gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), SIZE_HEIGHT_LINE);//AP
            
    gtk_widget_set_size_request (GTK_WIDGET (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), (int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
            
    gtk_window_resize (GTK_WINDOW (self), (int)(SIZE_WIDTH_ALL*self->priv->widthRatio), (int)(SIZE_HEIGHT_LINE*self->priv->heightRatio));//AP
        
    }
    //     else
    //     {
    //         g_warning("HACK unsuccessful");
    //     }

        
    return FALSE;
    }
    .........
    snip......... 
    Good that it helped someone!
    That hack was necessary when I started with custom width. Without it, the "X" (close) bt for the widget would go to the top-right corner when the widget is loaded but it would continue there forever...
    I you shrank the widget you would get a flying "X" in the middle of nothing =0. The hack is to always load the widget with the small size (to put the X bt beside the Conf one) and then resize it some time later..

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to cpscotti For This Useful Post:
    iKneaDough

     
    No!No!No!Yes! | # 77 | 2010-01-27, 11:28 | Report

    Originally Posted by cpscotti View Post
    Good that it helped someone!
    That hack was necessary when I started with custom width. Without it, the "X" (close) bt for the widget would go to the top-right corner when the widget is loaded but it would continue there forever...
    I you shrank the widget you would get a flying "X" in the middle of nothing =0. The hack is to always load the widget with the small size (to put the X bt beside the Conf one) and then resize it some time later..
    I believe there is still something to be investigated with respect to positioning of "service" icons (settings/close)... this is also quite weird:


    There is also an other issue with the positioning of newly instantiated DCE widgets. They get created on different desktop than the one you are working on.

    I tested the code in X86 scratchbox only, so far.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
    iKneaDough

     
    cpscotti | # 78 | 2010-01-27, 11:32 | Report

    Originally Posted by No!No!No!Yes! View Post
    I believe there is still something to be investigated with respect to positioning of "service" icons (settings/close)... this is also quite weird:


    There is also an other issue with the positioning of newly instantiated DCE widgets. They get created on different desktop than the one you are working on.

    I tested the code in X86 scratchbox only, so far.
    Well.. I'll just "extend" the "hack" to height. I believe that what happened there is due to the lower widget being "saved" as big and the re-loaded. The others were loaded from a single line one and then extended. Try restarting the GUI and you'll see the service icons "going around".

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to cpscotti For This Useful Post:
    iKneaDough

     
    vldcnst | # 79 | 2010-01-27, 12:00 | Report

    Code:
    wget -q -O - api.myiptest.com | awk -F"\"" '{ print "ext	" $4 " (" toupper($28) ")" }'
    Getting external IP address and country code.

    Code:
    wget -q -O - api.myiptest.com | awk -F"\"" '{ print "ext	" $4 " (" $12 " " toupper($28) ")" }'
    Getting external IP address, ISP name and country code.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by vldcnst; 2010-01-27 at 12:14.
    The Following 3 Users Say Thank You to vldcnst For This Useful Post:
    cpscotti, iKneaDough, naabi

     
    naabi | # 80 | 2010-01-27, 12:10 | Report

    Do I feel stupid after reading the previous example.Tried to give wget switch -O /dev/stdout, and it worked only randomly, so I decided to use a temp file. Well, you learn...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 8 of 42 | Prev |   6     7   8   9     10   18 | Next | Last
vBulletin® Version 3.8.8
Normal Logout