GtkSelectionMode

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

GtkSelectionMode

Gtk+ - General mailing list
Hi, list,
This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
has 4 modes for selection,
while this link:
https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
has 5.

I understand that on GTK "selection multiple" and "selection extended"
are basically the same thing, hence removal of the "extended" style.
But maybe you are looking at it wrong - why not use the multiple selection
and use keyboard in addition?

Windows and OSX are doing it this way, which means it makes it hard to write
portable code with GTK{+}.

Is there a reason behind it?

Thank you.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
On 13.02.2019 20:41, Igor Korot via gtk-list wrote:
> Hi, list,
> This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
> has 4 modes for selection,
> while this link:
> https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
> has 5.
>

The code actually says:

> /* list selection modes */
> typedef enum
> {
>   GTK_SELECTION_NONE,                             /* Nothing can be selected */
>   GTK_SELECTION_SINGLE,
>   GTK_SELECTION_BROWSE,
>   GTK_SELECTION_MULTIPLE,
>   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
> } GtkSelectionMode;

So unless you dig up an old version of GTK2 (before that deprecation went into
effect), you can't know what EXTENDED selection actually meant. I looked at
gtk+-2.2 (!!!), and it also had that value deprecated. So this must be a
holdout from the GTK+-1.x era.

That doesn't mean that there isn't a case for extending (no pun intended)
current selection (no pun intended) of selection modes, but you'd have to
explain your idea a bit more thoroughly.


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
Hi,

On Wed, Feb 13, 2019 at 1:00 PM LRN via gtk-list <[hidden email]> wrote:

>
> On 13.02.2019 20:41, Igor Korot via gtk-list wrote:
> > Hi, list,
> > This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
> > has 4 modes for selection,
> > while this link:
> > https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
> > has 5.
> >
>
> The code actually says:
>
> > /* list selection modes */
> > typedef enum
> > {
> >   GTK_SELECTION_NONE,                             /* Nothing can be selected */
> >   GTK_SELECTION_SINGLE,
> >   GTK_SELECTION_BROWSE,
> >   GTK_SELECTION_MULTIPLE,
> >   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
> > } GtkSelectionMode;

I didn't look at the code. I just followed the documentation.

>
> So unless you dig up an old version of GTK2 (before that deprecation went into
> effect), you can't know what EXTENDED selection actually meant. I looked at
> gtk+-2.2 (!!!), and it also had that value deprecated. So this must be a
> holdout from the GTK+-1.x era.

OK.

>
> That doesn't mean that there isn't a case for extending (no pun intended)
> current selection (no pun intended) of selection modes, but you'd have to
> explain your idea a bit more thoroughly.

Well, there are multiple scenarios.
1. Just clicking on the item.
2. Clicking on the item with the Ctrl key pressed
3. Clicking on the item with the Shift key pressed.

I think that 1 should be defined as multi-select, while 2 and 3 should
be defined as extended one.

And from what I understand, MSW, OSX and Qt all agree with me. ;-)

Thank you.

>
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
i think you're getting confused:

from the GTK-3 manual explaining how this option:

GTK_SELECTION_MULTIPLE
Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child pointed to. Some widgets may also allow Click-drag to select a range of elements.

in other words, what you want (different ways to select multiple records) all happens with the single enum specifier GTK_SELECTION_MULTIPLE.  i can also confirm this is also how it works in GTK-2.

so no functionality was lost between 2 and 3, and gtk also agrees with all those other platforms you cite (assuming you're referring to available functionality, as opposed to exactly how the enums are named... ;)

the example you coded didn't work like this?

richard

On Wed, Feb 13, 2019 at 4:04 PM Igor Korot via gtk-list <[hidden email]> wrote:
Hi,

On Wed, Feb 13, 2019 at 1:00 PM LRN via gtk-list <[hidden email]> wrote:
>
> On 13.02.2019 20:41, Igor Korot via gtk-list wrote:
> > Hi, list,
> > This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
> > has 4 modes for selection,
> > while this link:
> > https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
> > has 5.
> >
>
> The code actually says:
>
> > /* list selection modes */
> > typedef enum
> > {
> >   GTK_SELECTION_NONE,                             /* Nothing can be selected */
> >   GTK_SELECTION_SINGLE,
> >   GTK_SELECTION_BROWSE,
> >   GTK_SELECTION_MULTIPLE,
> >   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
> > } GtkSelectionMode;

I didn't look at the code. I just followed the documentation.

>
> So unless you dig up an old version of GTK2 (before that deprecation went into
> effect), you can't know what EXTENDED selection actually meant. I looked at
> gtk+-2.2 (!!!), and it also had that value deprecated. So this must be a
> holdout from the GTK+-1.x era.

OK.

>
> That doesn't mean that there isn't a case for extending (no pun intended)
> current selection (no pun intended) of selection modes, but you'd have to
> explain your idea a bit more thoroughly.

Well, there are multiple scenarios.
1. Just clicking on the item.
2. Clicking on the item with the Ctrl key pressed
3. Clicking on the item with the Shift key pressed.

I think that 1 should be defined as multi-select, while 2 and 3 should
be defined as extended one.

And from what I understand, MSW, OSX and Qt all agree with me. ;-)

Thank you.

>
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
sorry, typing too fast and missed the word *not*, should have read:

so no functionality was *not* lost between 2 and 3....

On Wed, Feb 13, 2019 at 4:20 PM richard boaz <[hidden email]> wrote:
i think you're getting confused:

from the GTK-3 manual explaining how this option:

GTK_SELECTION_MULTIPLE
Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child pointed to. Some widgets may also allow Click-drag to select a range of elements.

in other words, what you want (different ways to select multiple records) all happens with the single enum specifier GTK_SELECTION_MULTIPLE.  i can also confirm this is also how it works in GTK-2.

so no functionality was lost between 2 and 3, and gtk also agrees with all those other platforms you cite (assuming you're referring to available functionality, as opposed to exactly how the enums are named... ;)

the example you coded didn't work like this?

richard

On Wed, Feb 13, 2019 at 4:04 PM Igor Korot via gtk-list <[hidden email]> wrote:
Hi,

On Wed, Feb 13, 2019 at 1:00 PM LRN via gtk-list <[hidden email]> wrote:
>
> On 13.02.2019 20:41, Igor Korot via gtk-list wrote:
> > Hi, list,
> > This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
> > has 4 modes for selection,
> > while this link:
> > https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
> > has 5.
> >
>
> The code actually says:
>
> > /* list selection modes */
> > typedef enum
> > {
> >   GTK_SELECTION_NONE,                             /* Nothing can be selected */
> >   GTK_SELECTION_SINGLE,
> >   GTK_SELECTION_BROWSE,
> >   GTK_SELECTION_MULTIPLE,
> >   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
> > } GtkSelectionMode;

I didn't look at the code. I just followed the documentation.

>
> So unless you dig up an old version of GTK2 (before that deprecation went into
> effect), you can't know what EXTENDED selection actually meant. I looked at
> gtk+-2.2 (!!!), and it also had that value deprecated. So this must be a
> holdout from the GTK+-1.x era.

OK.

>
> That doesn't mean that there isn't a case for extending (no pun intended)
> current selection (no pun intended) of selection modes, but you'd have to
> explain your idea a bit more thoroughly.

Well, there are multiple scenarios.
1. Just clicking on the item.
2. Clicking on the item with the Ctrl key pressed
3. Clicking on the item with the Shift key pressed.

I think that 1 should be defined as multi-select, while 2 and 3 should
be defined as extended one.

And from what I understand, MSW, OSX and Qt all agree with me. ;-)

Thank you.

>
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
Hi, guys,

On Wed, Feb 13, 2019 at 3:21 PM richard boaz <[hidden email]> wrote:
>
> sorry, typing too fast and missed the word *not*, should have read:
>
> so no functionality was *not* lost between 2 and 3....

Unfortunately thats not how it looks here.
When I create a control with GTK_SELECTION_MULTIPLE and just click on
the item - it works just like single selection.
In order to select multiple strings I have to press Ctrl key.

Does it work for you?
Maybe some other code here prevents it to work like this?

Thank you.

>
> On Wed, Feb 13, 2019 at 4:20 PM richard boaz <[hidden email]> wrote:
>>
>> i think you're getting confused:
>>
>> from the GTK-3 manual explaining how this option:
>>
>> GTK_SELECTION_MULTIPLE
>> Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child pointed to. Some widgets may also allow Click-drag to select a range of elements.
>>
>> in other words, what you want (different ways to select multiple records) all happens with the single enum specifier GTK_SELECTION_MULTIPLE.  i can also confirm this is also how it works in GTK-2.
>>
>> so no functionality was lost between 2 and 3, and gtk also agrees with all those other platforms you cite (assuming you're referring to available functionality, as opposed to exactly how the enums are named... ;)
>>
>> the example you coded didn't work like this?
>>
>> richard
>>
>> On Wed, Feb 13, 2019 at 4:04 PM Igor Korot via gtk-list <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> On Wed, Feb 13, 2019 at 1:00 PM LRN via gtk-list <[hidden email]> wrote:
>>> >
>>> > On 13.02.2019 20:41, Igor Korot via gtk-list wrote:
>>> > > Hi, list,
>>> > > This link: https://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkSelectionMode
>>> > > has 4 modes for selection,
>>> > > while this link:
>>> > > https://developer.gnome.org/gtk2/stable/gtk2-Standard-Enumerations.html#GtkSelectionMode
>>> > > has 5.
>>> > >
>>> >
>>> > The code actually says:
>>> >
>>> > > /* list selection modes */
>>> > > typedef enum
>>> > > {
>>> > >   GTK_SELECTION_NONE,                             /* Nothing can be selected */
>>> > >   GTK_SELECTION_SINGLE,
>>> > >   GTK_SELECTION_BROWSE,
>>> > >   GTK_SELECTION_MULTIPLE,
>>> > >   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
>>> > > } GtkSelectionMode;
>>>
>>> I didn't look at the code. I just followed the documentation.
>>>
>>> >
>>> > So unless you dig up an old version of GTK2 (before that deprecation went into
>>> > effect), you can't know what EXTENDED selection actually meant. I looked at
>>> > gtk+-2.2 (!!!), and it also had that value deprecated. So this must be a
>>> > holdout from the GTK+-1.x era.
>>>
>>> OK.
>>>
>>> >
>>> > That doesn't mean that there isn't a case for extending (no pun intended)
>>> > current selection (no pun intended) of selection modes, but you'd have to
>>> > explain your idea a bit more thoroughly.
>>>
>>> Well, there are multiple scenarios.
>>> 1. Just clicking on the item.
>>> 2. Clicking on the item with the Ctrl key pressed
>>> 3. Clicking on the item with the Shift key pressed.
>>>
>>> I think that 1 should be defined as multi-select, while 2 and 3 should
>>> be defined as extended one.
>>>
>>> And from what I understand, MSW, OSX and Qt all agree with me. ;-)
>>>
>>> Thank you.
>>>
>>> >
>>> > _______________________________________________
>>> > gtk-list mailing list
>>> > [hidden email]
>>> > https://mail.gnome.org/mailman/listinfo/gtk-list
>>> _______________________________________________
>>> gtk-list mailing list
>>> [hidden email]
>>> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Paul Davis


On Wed, Feb 13, 2019 at 2:30 PM Igor Korot via gtk-list <[hidden email]> wrote:

Unfortunately thats not how it looks here.
When I create a control with GTK_SELECTION_MULTIPLE and just click on
the item - it works just like single selection.
In order to select multiple strings I have to press Ctrl key.

what platform or desktop toolkit does *not* work this way?

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
Hi, Paul,

On Wed, Feb 13, 2019 at 10:03 PM Paul Davis <[hidden email]> wrote:

>
>
>
> On Wed, Feb 13, 2019 at 2:30 PM Igor Korot via gtk-list <[hidden email]> wrote:
>>
>>
>> Unfortunately thats not how it looks here.
>> When I create a control with GTK_SELECTION_MULTIPLE and just click on
>> the item - it works just like single selection.
>> In order to select multiple strings I have to press Ctrl key.
>
>
> what platform or desktop toolkit does *not* work this way?

I'm running Gentoo Linux with GNOME 3 and GTK+ 3.22.30 from Gentoo repository

[code]
IgorReinCloud / # emerge --info
Portage 2.3.49 (python 3.6.5-final-0, targets/desktop/gnome/3.24,
gcc-7.3.0, glibc-2.26-r7, 4.14.65-gentoo x86_64)
=================================================================
System uname: Linux-4.14.65-gentoo-x86_64-AMD_E-350_Processor-with-gentoo-2.4.1
KiB Mem:     7879424 total,   1176796 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of repository gentoo: Fri, 05 Oct 2018 03:00:01 +0000
Head commit of repository gentoo: 2fae3c1a66e8b36c3c3b9681908c9285a99d0d61
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.29::dantrell-gnome
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:

dantrell-gnome-3-24
    location: /var/lib/layman/dantrell-gnome-3-24
    masters: gentoo
    priority: 100

dantrell-gnome
    location: /var/lib/layman/dantrell-gnome
    masters: gentoo
    priority: 150

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=barcelona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
/etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=barcelona"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT
PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME
XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified
distlocks ebuild-locks fixlafiles merge-sync multilib-strict news
parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug
strict unknown-features-warn unmerge-logs unmerge-orphans userfetch
userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--omit-dir-times --compress --force --whole-file --delete --stats
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local
--exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl acpi alsa amd64 berkdb bzip2 cli colord crypt cxx dbus dri
dvd elogind firefox gdbm gnome gnome-keyring gnome-online-accounts gtk
gtk3 gtkstyle iconv introspection ipv6 libnotify libtirpc modules
multilib nautilus ncurses nls nptl openmp pam pcre policykit
pulseaudio readline seccomp ssl tcpd tracker unicode wxwidgets xattr
zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem
bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801
hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx
via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core
socache_shmcb unixd actions alias auth_basic authn_alias authn_anon
authn_dbm authn_default authn_file authz_dbm authz_default
authz_groupfile authz_host authz_owner authz_user autoindex cache cgi
cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter
file_cache filter headers include info log_config logio mem_cache mime
mime_magic negotiation rewrite setenvif speling status unique_id
userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets
stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool
swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt
gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle
oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip
tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse
synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk
hd44780 lb216 lcdm001 mtxorb ncurses text"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0"
POSTGRES_TARGETS="postgres9_5 postgres10"
PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6"
RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="radeon"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset
ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat
logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK,
LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

IgorReinCloud / # emerge -pv gtk+
 * Last emerge --sync was 132d 3h 5m 32s ago.

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-libs/gtk+-3.22.30:3/22::dantrell-gnome  USE="X
colord introspection (-aqua) -broadway -cloudprint -cups -examples
-test -vim-syntax -wayland -xinerama" ABI_X86="(64) -32 (-x32)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

 * IMPORTANT: 19 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

[/code]

From what I understand it always worked like this on Gentoo. Even with GTK+2.

Thank you.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Paul Davis


On Wed, Feb 13, 2019 at 10:49 PM Igor Korot <[hidden email]> wrote:
Hi, Paul,

On Wed, Feb 13, 2019 at 10:03 PM Paul Davis <[hidden email]> wrote:
>
>
>
> On Wed, Feb 13, 2019 at 2:30 PM Igor Korot via gtk-list <[hidden email]> wrote:
>>
>>
>> Unfortunately thats not how it looks here.
>> When I create a control with GTK_SELECTION_MULTIPLE and just click on
>> the item - it works just like single selection.
>> In order to select multiple strings I have to press Ctrl key.
>
>
> what platform or desktop toolkit does *not* work this way?

I'm running Gentoo Linux with GNOME 3 and GTK+ 3.22.30 from Gentoo repository


I'm afraid you missed my point. The behaviour you described sounds like the behaviour I have always seen on every version of Linux and every version of macOS that I've ever used. I have never come across an application/platform/desktop toolkit that uses a mouse and works differently to what you've described. To select multiple strings, you have to differentiate between "forget the current selection, i'm starting a new one" and "i want to add this to the selection", and the convention has been to use a modifier key (typically Ctrl) to do that.


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
Hi, Paul,

On Thu, Feb 14, 2019 at 10:41 AM Paul Davis <[hidden email]> wrote:

>
>
>
> On Wed, Feb 13, 2019 at 10:49 PM Igor Korot <[hidden email]> wrote:
>>
>> Hi, Paul,
>>
>> On Wed, Feb 13, 2019 at 10:03 PM Paul Davis <[hidden email]> wrote:
>> >
>> >
>> >
>> > On Wed, Feb 13, 2019 at 2:30 PM Igor Korot via gtk-list <[hidden email]> wrote:
>> >>
>> >>
>> >> Unfortunately thats not how it looks here.
>> >> When I create a control with GTK_SELECTION_MULTIPLE and just click on
>> >> the item - it works just like single selection.
>> >> In order to select multiple strings I have to press Ctrl key.
>> >
>> >
>> > what platform or desktop toolkit does *not* work this way?
>>
>> I'm running Gentoo Linux with GNOME 3 and GTK+ 3.22.30 from Gentoo repository
>>
>
> I'm afraid you missed my point. The behaviour you described sounds like the behaviour I have always seen on every version of Linux and every version of macOS that I've ever used. I have never come across an application/platform/desktop toolkit that uses a mouse and works differently to what you've described. To select multiple strings, you have to differentiate between "forget the current selection, i'm starting a new one" and "i want to add this to the selection", and the convention has been to use a modifier key (typically Ctrl) to do that.

This is weird.
I know for sure that (at least on Windows) there are exist 2 different
styles - LBS_MULTIPLESEL and LBS_EXTENDEDSEL.
According to the MSDN (ref.
https://docs.microsoft.com/en-us/windows/desktop/controls/list-box-styles):

LBS_MULTIPLESEL - Turns string selection on or off each time the user
clicks or double-clicks a string in the list box. The user can select
any number of strings.
LBS_EXTENDEDSEL - Allows multiple items to be selected by using the
SHIFT key and the mouse or special key combinations.

I interpret this as following:
Using 1, I can select multiple string with just a mouse click if the
string is not being selected. If the string is already selected, it
becomes deselected without selection clearing on any other previously
selected string.
Using 2, I can extend the selection, i.e. pressing Shift, I can select
continuous string, i.e. select 1,2,3 and 4 strings with just 2 clicks.
Or using Ctrl, I can select multiple strings.

And this is exactly the behavior I see on Windows. And it is NOT how
it behaves on *nix/GTK.

Maybe all your Windows programs were using LBS_EXTENDEDSEL?

Also, I think I will need to test my Cocoa apps as its possible I
forgot what it did. Sorry about that. I will do that tonight.

Thank you.

>
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Greg Ewing
Igor Korot via gtk-list wrote:
> I interpret this as following:
> Using 1, I can select multiple string with just a mouse click if the
> string is not being selected. If the string is already selected, it
> becomes deselected without selection clearing on any other previously
> selected string.
>
> And this is exactly the behavior I see on Windows.

Can you provide an example of a Windows app that behaves like this
(i.e. multiple selection with unmodified mouse clicks)? I can't
remember ever seeing one.

--
Greg
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Gtk+ - General mailing list
Hi, Greg,

On Thu, Feb 14, 2019 at 4:07 PM Greg Ewing <[hidden email]> wrote:

>
> Igor Korot via gtk-list wrote:
> > I interpret this as following:
> > Using 1, I can select multiple string with just a mouse click if the
> > string is not being selected. If the string is already selected, it
> > becomes deselected without selection clearing on any other previously
> > selected string.
> >
> > And this is exactly the behavior I see on Windows.
>
> Can you provide an example of a Windows app that behaves like this
> (i.e. multiple selection with unmodified mouse clicks)? I can't
> remember ever seeing one.

What do you mean - "unmodified mouse clicks"?
Also, as far as I understand most native Windows applications have
extended selection style on and not just multiple selection
just to simplify the bulk selection operation, i.e. pressing
Shift to selecting continuous string in the list box.

I think that extending selection was made just for this purpose -
to allow the user to extend the selection for the bulk strings
either by using Shift or Ctrl.

I can try to create one such application with just a native Windows calls.
and a window with the listbox in it or some MFC application.
Can do it over this weekend.

Does this list allows attachments? Something like zip/tar/7z file?

Thank you.

>
> --
> Greg
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GtkSelectionMode

Greg Ewing
Igor Korot wrote:
> What do you mean - "unmodified mouse clicks"?

I mean without pressing any modifier keys (Shift, Ctrl, etc.)
It sounded like you expected this to toggle selection of
individual items on and off, but in my experience the Ctrl
key is needed to do that. Clicking with no modifiers
clears any existing selection, then selects the clicked
item.

If I misunderstood what you meant, my apologies.

--
Greg
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list