Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 10 Dec 2019, 17:33
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Building MMview, a universal file viewer
Post new topic   Reply to topic View previous topic :: View next topic
Page 20 of 21 [309 Posts]   Goto page: Previous 1, 2, 3, ..., 18, 19, 20, 21 Next
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Mon 19 Aug 2019, 22:47    Post subject:  

rockedge wrote:
I am have trouble getting the quick view to work on the latest versions of WeeDog based on Void Linux. Earlier test versions of WeeDog MM_VIEW was working well.
Thanks rockedge for your error report and your PMs with your screenshot. This made me look again at your error messages.
There are three:

Code:
widget_menuitem_create(): <width> not implemented for this widget.
As I told you in my PM I have no idea what this refers to.
In MMview there is no "widget_menuitem_create()" function and in GTK - as far as I read the documentation - there is no such function either. In menus <width> is used for icons in menuitems and AFAIK supported since the earliest version of gtkdialog, so "widget_menuitem_create()" remains a mystery. Maybe other members can help.

Code:
BusyBox v1.30.0 (2018-12-30 22:25:27 CET) multi-call binary.

Usage: timeout [-s SIG] SECS PROG ARGS

Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Default SIG: TERM.
This was an easy one. Cause and remedies are known and as I understand you fixed it already. In any case this affects only the display for directories and not text or image files.

Code:
environment: line 18: file: command not found
This is the one I overlooked and which is responsible for your dysfunctional viewer pane. Your system lacks or can't find the file command. MMview wouldn't work without it. I took it for granted that every Puppy has it installed.

Looks like "Void Linux" is a little bit too void Wink
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Mon 19 Aug 2019, 23:05    Post subject:  

Please refer to my next post for where error seems to come from in detail. Hope that allows issue to be sorted out easily.

MochiMoppel wrote:
Code:
widget_menuitem_create(): <width> not implemented for this widget.
As I told you in my PM I have no idea what this refers to.
In MMview there is no "widget_menuitem_create()" function and in GTK - as far as I read the documentation - there is no such function either. In menus <width> is used for icons in menuitems and AFAIK supported since the earliest version of gtkdialog, so "widget_menuitem_create()" remains a mystery. Maybe other members can help.


Code:
GtkWidget *widget_menuitem_create(
   AttributeSet *Attr, tag_attr *attr, gint Type)
{
   #define           TYPE_MENUITEM 0
   #define           TYPE_MENUITEM_IMAGE_STOCK 1
   #define           TYPE_MENUITEM_IMAGE_ICON 2
   #define           TYPE_MENUITEM_IMAGE_FILE 3
   #define           TYPE_MENUITEM_CHECK 4
   #define           TYPE_MENUITEM_RADIO 5
   #define           TYPE_MENUITEM_SEPARATOR 6
   GdkPixbuf        *pixbuf;
   GError           *error = NULL;
   GList            *element;
   GtkAccelGroup    *accel_group = NULL;
   GtkIconTheme     *icon_theme;
   GtkWidget        *image;
   GtkWidget        *widget;
   gchar             accel_path[64];
   gchar            *active;
   gchar            *icon_name, *image_name;
   gchar            *label, *stock_id;
   gchar            *value;
   gint              is_active;
   gint              menuitemtype = TYPE_MENUITEM;
   gint              width = -1, height = -1, size = 16;
guint accel_key = 0, accel_mods = 0, custom_accel = 0;


That function is in gtkdialog widget_menuitem.c:

https://github.com/01micko/gtkdialog/blob/master/src/widget_menuitem.c

I don't know what the issue is at the moment though. Presumably, <width> not implemented. Checks docs for the function advised (on 01micko's github gtkdialog site - will double check where - been a long time since I looked at any of this):

http://01micko.com/reference/

Above is the reference but I don't know if it documents the issue anyway - like I say I haven't been working with this stuff for too long to help further just now.

MochiMoppel wrote:
Looks like "Void Linux" is a little bit too void Wink


Void must be awful then... (but rockedge knows how to install 'file' package - don't worry about that).

wiak

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130

Last edited by wiak on Mon 19 Aug 2019, 23:37; edited 1 time in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Mon 19 Aug 2019, 23:35    Post subject:  

https://github.com/01micko/gtkdialog/blob/master/src/widget_menuitem.c

Here is where the error seems to come from I think. Maybe the comment-line at the top explains the issue.

wiak

Code:
   /* Only image menuitems from theme or file support this */
   if (attributeset_is_avail(Attr, ATTR_WIDTH)) {
      if (menuitemtype == TYPE_MENUITEM_IMAGE_ICON ||
         menuitemtype == TYPE_MENUITEM_IMAGE_FILE) {
         width = atoi(attributeset_get_first(&element, Attr, ATTR_WIDTH));
      } else {
         fprintf(stderr, "%s(): <width> not implemented for this widget.\n",
            __func__);
      }
}


So I guess must be issue involving:

/* Only image menuitems from theme or file support this */

It seems that the "menuitemtype" currently being used in rockedges set up isn't one of these (icon issue?):

(menuitemtype == TYPE_MENUITEM_IMAGE_ICON ||
menuitemtype == TYPE_MENUITEM_IMAGE_FILE)

_________________
Tiny Linux Blog: http://www.tinylinux.info/
Check Firmware: www.murga-linux.com/puppy/viewtopic.php?p=1022797
tinycore/slitaz: http://www.murga-linux.com/puppy/viewtopic.php?p=990130#990130
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1349
Location: Connecticut, United States

PostPosted: Tue 20 Aug 2019, 11:30    Post subject:  

Thank you everyone for the spot on help. I was missing "file" in my WeeDog (Void Linux base) After installing file, MMview (mm_view_20190702) is working once again.

Only the warning
Code:
widget_menuitem_create(): <width> not implemented for this widget.

shows up when MMview is started from the command line but everything seems to be working well otherwise.

I have included "file" now in the WeeDog firstbuild.plug build recipe script since I had missed that file was not included in the Void Linux base-minimal package.

A screenshot of WeeDog (firstrib-s102) based on Void Linux binaries
2019-08-20-112752_600px.png
 Description   
 Filesize   126.06 KB
 Viewed   607 Time(s)

2019-08-20-112752_600px.png

Back to top
View user's profile Send private message Visit poster's website 
perdido


Joined: 09 Dec 2013
Posts: 1427
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sat 24 Aug 2019, 12:00    Post subject:  

Couple icons for MMview desktop are no longer available, MM explains where the "official" icon resides in the post following this one.
Last edited by perdido on Sun 25 Aug 2019, 07:02; edited 1 time in total
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Sat 24 Aug 2019, 23:56    Post subject:  

For a desktop icon start MMview, and when you are happy with the color of his fashion glasses, copy the file /tmp/mm_view/iconmmv.svg to a permanent location, e.g. /root/.config/mm_view/iconmmv.svg. It's a 48x48px icon and only 317 bytes small.

Though I don't like desktop icons in general I really recommend to have MMview on the desktop. Dragging a file from ROX-Filer onto a MMview icon or into a running window provides functionality and speed not possible with a menu entry.

Here the code for a genuine MMview icon - with pink glasses:
Code:
<svg width="48" height="48" viewBox="0 0 100 100">
<style type="text/css">circle{fill:#ffc0cb}*{fill:#fff;stroke:#000;stroke-width:6;stroke-linecap:round;}</style>
<path   d="M-2,100 C0,-10 100,-10 102,100M 40,5 50,15 70,10 60,17M 65,80 70,80"/>
<circle   cx="27" cy="50" r="20"/>
<circle   cx="73" cy="50" r="20"/>
</svg>


.

Last edited by MochiMoppel on Fri 30 Aug 2019, 10:06; edited 1 time in total
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1427
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sun 25 Aug 2019, 06:59    Post subject:  

MochiMoppel wrote:
Shocked How did you manage to make him uglier than he already is?


I cut the icon from the MMview window and used my "artistic depiction"
It took a lot of work making mine look like that..... Laughing

The icon in /tmp/mm_view/iconmmv.svg being almost the spitting image of my rendition has convinced me that additional icons are not needed.
Now using the icon located in /tmp/mm_view/iconmmv.svg as the desktop icon, I like the eyeglasses on the desktop icon change color after shutting down and restarting the program,

.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Mon 26 Aug 2019, 23:52    Post subject:  

perdido wrote:
Now using the icon located in /tmp/mm_view/iconmmv.svg as the desktop icon, I like the eyeglasses on the desktop icon change color after shutting down and restarting the program,.
But this means that you see an ugly ROX default icon when MMview is not running, doesn't it?
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1427
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Tue 27 Aug 2019, 08:41    Post subject:  

MochiMoppel wrote:
perdido wrote:
Now using the icon located in /tmp/mm_view/iconmmv.svg as the desktop icon, I like the eyeglasses on the desktop icon change color after shutting down and restarting the program,.
But this means that you see an ugly ROX default icon when MMview is not running, doesn't it?


After a reboot only, once MMview has run once the icon remains.
The icon glasses then change color on each subsequent start of MMview - if I touch the desktop icon with the mouse pointer. No doubt due to regeneration of the icon in /tmp

I suppose maybe having the iconmmv.svg icon generated in /usr/local/libs/X11/pixmaps/ would let it remain in the system between reboots Smile

.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Tue 27 Aug 2019, 19:25    Post subject:  

perdido wrote:
After a reboot only, once MMview has run once the icon remains..
Are you sure? This would be a bug.
Currently MMview is designed to delete /tmp/mm_view/iconmmv.svg after the last running instance of MMview is closed. So if the icon remains you either have another MMview open, you haven't yet moved your mouse cursor over the icon (which would reset it to ROX default), or /tmp/mm_view/iconmmv.svg hasn't been properly deleted, in which case I would have to switch into debug mode.

Once we have sorted this out let's think of a method to display a permanent icon (uncolored glasses?) and, after starting MMview, change the color of the glasses to the current color. After closing MMview the permanent icon should be restored. Sounds crazy enough not to try Laughing
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1427
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Tue 27 Aug 2019, 20:04    Post subject:  

MochiMoppel wrote:
perdido wrote:
After a reboot only, once MMview has run once the icon remains..
Are you sure? This would be a bug.
Currently MMview is designed to delete /tmp/mm_view/iconmmv.svg after the last running instance of MMview is closed. So if the icon remains you either have another MMview open, you haven't yet moved your mouse cursor over the icon (which would reset it to ROX default), or /tmp/mm_view/iconmmv.svg hasn't been properly deleted, in which case I would have to switch into debug mode Laughing


I was using MMview version 04-09-2019 and it was leaving 4 files in /tmp/mm_view/ after closing the program.
I changed to an older version 11-01-2018 and /tmp/mm_view/ contents are deleted after closing the program.
I tried latest version 07-02-2019 and /tmp/mm_view/ contents are deleted after closing the program. No bug in latest version.

Looks like I was using the only version that acted like that Smile
Whatever bug it was in 04-09-2019 has been squashed in 07-02-2019

I thought I was going crazier there for a minute Laughing

Quote:
Once we have sorted this out let's think of a method to display a permanent icon (uncolored glasses?) and, after starting MMview, change the color of the glasses to the current color. After closing MMview the permanent icon should be restored. Sounds crazy enough not to try Laughing

Ok, sounds like fun Smile

.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Thu 29 Aug 2019, 04:00    Post subject:  

Update 2019-08-29 (see also initial post)

This is a small service update. No new functionality. It adds support for busybox v1.30 or newer and fixes some minor glitches in recent distros. I also changed some keyboard shortcuts to bring them closer to de-facto standards (e.g. F2 for Rename) or to defuse potentially disruptive GTK built-in shortcuts (e.g. F6, which by default toggles between the 2 chooser panes but in some cases opens the search bar, making it difficult to return to the file list).

Shortcut changes:
Code:
Menu                         Old          New
--------------------------------------------------
File > Rename                Ctrl+R       F2
File > Show in Rox           Shift+Ctrl+R Ctrl+R
Document > Line Wrapping     none         F6
Document > Show Line Numbers F2           Ctrl+F6
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1943
Location: Japan

PostPosted: Sat 31 Aug 2019, 23:12    Post subject:  

Special desktop edition
Promised to perdido and based on above update I tried to set an icon for MMview that would change according to the color of the fat guy's glasses. When he is not viewing anything glasses are light gray.
Affected are icons on the pinboard and in ROX-Filer window

This is a special edition of MMview and I'm not sure if I will ever include this gimmick into future official versions though I admit that I'm starting to like it. It may even be useful: I often have multiple instances open and it happens that I forget an instance on a different desktop. The icon color tells me if there is still an instance open somewhere.

Uncompress and make executable as usual. For most fun drag the script from ROX-Filer to the desktop. Don't add an icon manually, just click and see what happens.

[Udate 2019-10-31]
Attached version is now based on MMview 2019-10-29.
If you have installed a previous version, please delete file iconrox.svg in directory /root/.config/mm_view.
Have fun Laughing
mm_viewme.gz
Description  New version based on MMview 2019-10-29
gz

 Download 
Filename  mm_viewme.gz 
Filesize  22.12 KB 
Downloaded  89 Time(s) 
ROXicons.jpg
 Description   
 Filesize   49.71 KB
 Viewed   299 Time(s)

ROXicons.jpg


Last edited by MochiMoppel on Thu 31 Oct 2019, 04:46; edited 2 times in total
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1427
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sun 01 Sep 2019, 00:39    Post subject:  

Hi MochiMoppel

Well would you look at that Shocked

Drag the script to the desktop and after MMview is started the first time there he is looking back at me.
Working beautifully, glasses turn color when MMview launched then turn light gray when shut down, thats very cool Smile

Thanks for doing the icon mod, much appreciated! I like it Smile

.
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 964
Location: europa near northsea

PostPosted: Sun 01 Sep 2019, 04:43    Post subject:    

MochiMoppel wrote:
This is a special edition of MMview and I'm not sure if I will ever include this gimmick into future official versions though I admit that I'm starting to like it.
To be sure I have it, I've downloaded this little gem! Very Happy
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 20 of 21 [309 Posts]   Goto page: Previous 1, 2, 3, ..., 18, 19, 20, 21 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1174s ][ Queries: 12 (0.0544s) ][ GZIP on ]