[gtk-osx-users] What is Window menu operaration logic - help needed

2013-05-08 Thread Andrius
Hi all,
I am working on Bluefish port to OSX 10.8. Suceeded to compile Bluefish with 
gtk+3.6 .4, glib 2.34.3 and GtkOsxApplication 2.0.1. Now I am trying to figure 
out how Window menu works, since it looks a little bit inconsistent. Windows 
menu is created with ..._set_window_menu() call.

By default it should track the application windows that are opened. When I 
create new gtk TOPLEVEL window, it adds window name to the list of the windows. 
However, when I destroy window (using (gtk_widget_destroy()), the window name 
is not always removed from the list. It looks that whether it is removed or not 
depends on how window is configured and what actions user did with the window. 
For example, if I set window to be transient with 
gtk_window_set_transient_for(), then the window is not removed from the list. 
The same window that is not set to be transient, is removed. If after creation 
of the window it looses focus, then it is not removed. If window stays focused 
after creation, everything is fine. And so on.
Is there some ideas what causes the window to be not removed from the list? Can 
somebody explain how the logic of adding/removing items from the list works?
Thanks in advance.
Andrius
___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


[gtk-osx-users] Is there a way to override default key bindings?

2013-10-09 Thread Andrius
Hi all,
I have one interesting issue that could not figure out how to solve. Using 
gtk+3.6.4 on MacOSX 10.8.4.
I want to override default key bindings for some widgets, most important are 
GtkEntry and GtkTextView. I did search on forums, but nothing useful was found. 
Tried several things that are described in gtk+3 docs, but it seems that 
nothing from these works on MacOSX:
1. Tried to but into gtk-keys.css following code:
@binding-set gtk-mac-cmd-c
{
  bind metax { cut-clipboard () };
  bind metac { copy-clipboard () };
  bind metav { paste-clipboard () };
  unbind ctrlx;
  unbind ctrlc;
  unbind ctrlv;
}
GtkEntry {
  gtk-key-bindings: gtk-mac-cmd-c;
}

No effect, all actions on GtkEntry still are done with ctrl+...
2. Tried loading binding_set into program with GtkCssProvider like in this 
pseudocode:
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_path (provider, filename, error)) ;    
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), 
GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
The css file I am loading has binding-set like in #1. Again, binding did not 
changed, although styles that were in css file were applied successfully. It 
looks that @binding-set rule is not processed for some reason on MacOSX.
3. The only way that works is to connect key-press-event signal to the GtkEntry 
and handle cmd+... combinations in signal callback manually. But this way I am 
having both ctrl+v and cmd+v doing the same thing - pasting text, for example. 
And having to handle this for each widget separately is not something that one 
would be wanting to do.

I am wondering if anybody knows solution to this problem... or is it know bug?
Andrius
___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Is there a way to override default key bindings?

2013-10-10 Thread Andrius
John,
do You remember when this was fixed? I tried latest moduleset, indeed, key 
bindings seems to be OK, but I have got number of other issues (I will write 
separate message on this). So, probably, for me it would be better to patch old 
good 3.6.4...
Andrius





 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Wednesday, October 9, 2013 10:40 PM
Subject: Re: [gtk-osx-users] Is there a way to override default key bindings?
 



On Oct 9, 2013, at 12:34 PM, Andrius andri...@yahoo.com wrote:

 Hi all,
 I have one interesting issue that could not figure out how to solve. Using 
 gtk+3.6.4 on MacOSX 10.8.4.
 I want to override default key bindings for some widgets, most important are 
 GtkEntry and GtkTextView. I did search on forums, but nothing useful was 
 found. Tried several things that are described in gtk+3 docs, but it seems 
 that nothing from these works on MacOSX:
 1. Tried to but into gtk-keys.css following code:
 @binding-set gtk-mac-cmd-c
 {
   bind metax { cut-clipboard () };
   bind metac { copy-clipboard () };
   bind metav { paste-clipboard () };
   unbind ctrlx;
   unbind ctrlc;
   unbind ctrlv;
 }
 GtkEntry {
   gtk-key-bindings: gtk-mac-cmd-c;
 }
 No effect, all actions on GtkEntry still are done with ctrl+...
 2. Tried loading binding_set into program with GtkCssProvider like in this 
 pseudocode:
 provider = gtk_css_provider_new ();
 gtk_css_provider_load_from_path (provider, filename, error)) ;    
 gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), 
 GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
 The css file I am loading has binding-set like in #1. Again, binding did not 
 changed, although styles that were in css file were applied successfully. It 
 looks that @binding-set rule is not processed for some reason on MacOSX.
 3. The only way that works is to connect key-press-event signal to the 
 GtkEntry and handle cmd+... combinations in signal callback manually. But 
 this way I am having both ctrl+v and cmd+v doing the same thing - pasting 
 text, for example. And having to handle this for each widget separately is 
 not something that one would be wanting to do.
 I am wondering if anybody knows solution to this problem... or is it know 
 bug?

It was a Gtk bug, since fixed. Rebuilding with the latest modulesets will get 
you your command-key accelerators and bindings back... with one caveat: Don't 
set use_quartz_accelerators to TRUE, because then the menu accelerators grab 
the key binding before gtk can see it, and it gets sent to whatever window has 
menu focus instead of the one that has keyboard focus.

Regards,
John Ralls




___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display

2013-10-10 Thread Andrius
Here is gtk-mac-integration backtrace (get this using gdb):

Program received signal SIGABRT, Aborted.
0x7fff8841a212 in __pthread_kill ()
(gdb) bt
#0  0x7fff8841a212 in __pthread_kill ()
#1  0x7fff8beeeb24 in pthread_kill ()
#2  0x7fff8bf32f61 in abort ()
#3  0x7fff8af659eb in abort_message ()
#4  0x7fff8af6339a in default_terminate ()
#5  0x7fff89ffa873 in _objc_terminate ()
#6  0x7fff8af633c9 in safe_handler_caller ()
#7  0x7fff8af63424 in std::terminate ()
#8  0x7fff8af6458b in __cxa_throw ()
#9  0x7fff89ffa50c in objc_exception_throw ()
#10 0x7fff8525e948 in +[NSException raise:format:arguments:] ()
#11 0x7fff912894c2 in -[NSAssertionHandler 
handleFailureInMethod:object:file:lineNumber:description:] ()
#12 0x7fff8ee780a3 in -[NSMenu removeItem:] ()
#13 0x00010043215c in cocoa_menu_item_add_submenu (menu_shell=0x1038e0e30, 
cocoa_menu=0x10dee5c10, toplevel=0, debug=0) at cocoa_menu_item.c:703
#14 0x00010043363a in parent_set_emission_hook (ihint=0x7fff5fbfd350, 
n_param_values=2, param_values=0x7fff5fbfd3d0, data=0x1024e7fa0) at 
gtkosxapplication_quartz.c:110
#15 0x00010103176a in signal_emit_unlocked_R () at gsignal.c:2103
#16 0x000101032a00 in g_signal_emit_valist (instance=0x7fff5fbfd5d0, 
signal_id=1606407120, detail=1606407632, var_args=0x7fff5fbfd698) at 
gsignal.c:3330
#17 0x000101033034 in g_signal_emit (instance=0x7fff5fbfd350, signal_id=0, 
detail=0) at gsignal.c:3386
#18 0x00010081afeb in gtk_widget_set_parent ()
#19 0x00010064f3d2 in gtk_menu_shell_real_insert ()
#20 0x000100636c63 in gtk_menu_real_insert ()
#21 0x00010062c05c in _gtk_marshal_VOID__OBJECT_INT ()
#22 0x00010102166b in g_closure_invoke (closure=0x10250f5d0, 
return_value=0x0, n_param_values=1606408368, param_values=0x7fff5fbfd8b0, 
invocation_hint=0x7fff5fbfd8b0) at gclosure.c:777
#23 0x00010103166b in signal_emit_unlocked_R () at gsignal.c:2103
#24 0x000101032a00 in g_signal_emit_valist (instance=0x7fff5fbfdbf0, 
signal_id=1606408656, detail=1606409200, var_args=0x7fff5fbfdcb8) at 
gsignal.c:3330
#25 0x000101033034 in g_signal_emit (instance=0x10250f5d0, signal_id=0, 
detail=0) at gsignal.c:3386
#26 0x00010064f370 in gtk_menu_shell_insert ()
#27 0x000100805337 in update_node ()
#28 0x000100805c0c in update_node ()
#29 0x000100805c0c in update_node ()
#30 0x000100805c0c in update_node ()
#31 0x000100805c0c in update_node ()
#32 0x000100805e30 in do_updates ()
#33 0x000100805f1a in gtk_ui_manager_ensure_update ()
#34 0x0001007ff0e4 in gtk_ui_manager_real_get_widget ()
#35 0x0001007ffdef in gtk_ui_manager_get_widget ()
#36 0x000100035b17 in bfwin_show_main ()


Hopefully this helps...
Andrius




 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Thursday, October 10, 2013 7:10 PM
Subject: Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display
 




On Oct 10, 2013, at 8:53 AM, Andrius andri...@yahoo.com wrote:

I would like to clarify regarding gtk-mac-integration. The crash happens when 
I open second main window (I wrote new which might be misleading). The first 
window is always opened without problem. The second window might have some 
menus setup differently, for example toggled entries etc.
I will try to debug it later, but with 3.6.4. Is it OK?
Regarding HiDPI issue, I tried 3.9.6 version together with stable module set 
(just compiled gtk 3.9.6 instead of 3.10). This gave me back normal icon 
sizes, and fonts in GtkTextView. However, fonts in GtkTreeView were still 
blurred and TreeView itself was behaving strangely when expanding tree rows 
(I noticed also similar behavior on 3.10). Probably, this has nothing to do 
with gtk code, but I decided do not play with latest versions, and went back
 to gtk 3.6.4 module set, which works for me.


Please remember to copy the list on all replies: Use reply all (the 
double-arrow icon).


The gtk-mac-integration problem should be independent of gtk version. It would 
be interesting indeed if it isn't.


So Alex Larsson's HiDPI changes are only part of the issue. Interesting. 


I take it that you're building only for yourself, not for distribution.


Regards,
John Ralls



___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Is there a way to override default key bindings?

2013-10-10 Thread Andrius
This was https://bugzilla.gnome.org/show_bug.cgi?id=699901 .
After patching I got key bindings sets in css file working again.





 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Thursday, October 10, 2013 5:18 PM
Subject: Re: [gtk-osx-users] Is there a way to override default key bindings?
 




On Oct 10, 2013, at 12:08 AM, Andrius andri...@yahoo.com wrote:

John,
do You remember when this was fixed? I tried latest moduleset, indeed, key 
bindings seems to be OK, but I have got number of other issues (I will write 
separate message on this). So, probably, for me it would be better to patch 
old good 3.6.4...
Andrius




No. I wrote on a Gramps bug in early July that I'd found it and backported it 
to 3.8, but the only commit that fits the date is 
https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-8id=c65c2177416719f7769cf4f361fda6bfea50f5c7
and that seems to be in the wrong place.


I think you'll have to re-do the bisect. Sorry.


Regards,
John Ralls






 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Wednesday, October 9, 2013 10:40 PM
Subject: Re: [gtk-osx-users] Is there a way to override default key bindings?
 



On Oct 9, 2013, at 12:34 PM, Andrius andri...@yahoo.com wrote:

 Hi all,
 I have one interesting issue that could not figure out how to solve. Using 
 gtk+3.6.4 on MacOSX 10.8.4.
 I want to override default key bindings
 for some widgets, most important are GtkEntry and GtkTextView. I did search on 
forums, but nothing useful was found. Tried several things that are described 
in gtk+3 docs, but it seems that nothing from these works on MacOSX:
 1. Tried to but into gtk-keys.css following code:
 @binding-set gtk-mac-cmd-c
 {
   bind metax { cut-clipboard () };
   bind metac { copy-clipboard () };
   bind metav { paste-clipboard () };
   unbind ctrlx;
   unbind ctrlc;
   unbind ctrlv;
 }
 GtkEntry {
   gtk-key-bindings: gtk-mac-cmd-c;
 }
 No effect, all actions on GtkEntry still are done with
 ctrl+...
 2. Tried loading binding_set into program with GtkCssProvider like in this 
 pseudocode:
 provider = gtk_css_provider_new ();
 gtk_css_provider_load_from_path (provider, filename, error)) ;    
 gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), 
 GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
 The css file I am loading has binding-set like in #1. Again, binding did 
 not changed, although styles that were in css file were applied 
 successfully. It looks that @binding-set rule is not processed for some 
 reason on MacOSX.
 3. The only way that works is to connect key-press-event signal to the 
 GtkEntry and handle cmd+... combinations in signal callback manually. But 
 this way I am having both ctrl+v and cmd+v doing the same thing - pasting 
 text, for example. And having to handle this
 for each widget separately is not something that one would be wanting to do.
 I am wondering if anybody knows solution to this problem... or is it know 
 bug?

It was a Gtk bug, since fixed. Rebuilding with the latest modulesets will 
get you your command-key accelerators and bindings back... with one caveat: 
Don't set use_quartz_accelerators to TRUE, because then the menu 
accelerators grab the key binding before gtk can see it, and it gets sent to 
whatever window has menu focus instead of the one that has keyboard focus.

Regards,
John Ralls







___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display

2013-10-10 Thread Andrius
Well, it did not work. The same crash at the same line...
Andrius





 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Thursday, October 10, 2013 11:21 PM
Subject: Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display
 


On Oct 10, 2013, at 12:47 PM, Andrius andri...@yahoo.com wrote:

 Here is gtk-mac-integration backtrace (get this using gdb):
 
[SNIP]
 #13 0x00010043215c in cocoa_menu_item_add_submenu 
 (menu_shell=0x1038e0e30, cocoa_menu=0x10dee5c10, toplevel=0, debug=0) at 
 cocoa_menu_item.c:703
 

[SNIP]
 Hopefully this helps...

It does. Please try this:

diff --git a/src/cocoa_menu_item.c b/src/cocoa_menu_item.c
index 3f57f1f..9434556 100644
--- a/src/cocoa_menu_item.c
+++ b/src/cocoa_menu_item.c
@@ -699,7 +699,7 @@ cocoa_menu_item_add_submenu (GtkMenuShell *menu_shell,
    last_cocoa_item = item;
     }
   /* Finally make sure that the last item isn't a separator. */
-  if ([last_cocoa_item isSeparatorItem])
+  if (last_cocoa_item != nil  [last_cocoa_item isSeparatorItem])
     [cocoa_menu removeItem: last_cocoa_item];

   g_list_free (children);

If that doesn't work, I'll need you to figure out how last_cocoa_item is set 
to something that isn't on the NSMenu.


Regards,
John Ralls


___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display

2013-10-10 Thread Andrius
This patch fixed the problem.
I also noticed another issue.
The menu entries that are insensitive are not dimmed. When I click on such 
entry nothing happens, so they are made insensitive by code, just the color is 
not changed. Is this bug, or there is some changes how I should handle dimming? 
In 2.0.1 this was handled automatically.
Andrius





 From: John Ralls jra...@ceridwen.us
To: Andrius andri...@yahoo.com 
Cc: gtk-osx-users-list@gnome.org gtk-osx-users-list@gnome.org 
Sent: Friday, October 11, 2013 12:16 AM
Subject: Re: [gtk-osx-users] gtk+3.10 on MacOSX 10.8.5 with Retina display
 


On Oct 10, 2013, at 2:00 PM, Andrius andri...@yahoo.com wrote:

 Well, it did not work. The same crash at the same line...

Ah! I see it.

Try this:

diff --git a/src/cocoa_menu_item.c b/src/cocoa_menu_item.c
index 3f57f1f..5a9b0e2 100644
--- a/src/cocoa_menu_item.c
+++ b/src/cocoa_menu_item.c
@@ -692,14 +692,17 @@ cocoa_menu_item_add_submenu (GtkMenuShell *menu_shell,
       _GNSMenuItem *item = (_GNSMenuItem*)[cocoa_menu itemAtIndex: index];
       if ([item isSeparatorItem] 
      (last_cocoa_item == nil || [last_cocoa_item isSeparatorItem]))
+    {
      [cocoa_menu removeItem: item];
+      continue;
+    }
       if (([item respondsToSelector: @selector (isMarked)])  [item 
isMarked])
    [cocoa_menu removeItem: item];
       else if (![item isHidden])


Regards,
John Ralls


___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


[gtk-osx-users] gvfs on MacOSX

2014-01-19 Thread Andrius
Hi all,
have one question. I am using/developing bluefish on MacOSX. When I open 
GtkFileChooser dialog for opening the file, I would like to make it understand 
uri's like ftp:// or sftp:// in the Location bar. I have seen on some video 
this is working on Linux. I read in some place that for this feature one needs 
to have gvfs installed on the system (bluefish uses gio for file operations).
I have managed to compile gvfs with ftp/sftp support and all extra modules that 
gvfs needs (like dbus). But still, file chooser does not understands ftp:// and 
gives errors.
Does it make sense to continue? Maybe somebody know if any gtk-osx project 
managed to get this feature working?
Andrius
___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Switching keyboard layouts with Alt+Cmd+Space

2014-01-19 Thread Andrius
John,
I do not expect that my patch will be accepted, like other patches for 711019, 
so I did not submit it there.
I just wanted to show, how this particular problem of Alt+Cmd+Space not working 
on gtk-osx applications can be solved. It shows how to switch keyboard layouts 
manually, using Carbon framework.
If You, as maintainer of gtk-osx, will find this useful, feel free to 
incorporate it in some place.
Cmd+M minimizes window, while Cmd+H hides application. As far as I know there 
is special function to enable them in gtk-mac-integration, 
gtkosx_application_set_use_quartz_accelerators (). There should be some code 
handling them, since without executing 
gtkosx_application_set_use_quartz_accelerators () they do not work on my system.
Andrius











The patch and most of the commentary belong on the bug, not here. Patches in 
particular shouldn't be sent to mailing lists, they just get lost.


Note, however, that the patch in 711019 was withdrawn once the author 
understood how Gdk event handling interacts with the CFRunLoop. 


What specifically are you talking about for CMD-M and CMD-H? I don't recall 
any special code in gtk-mac-integration for either.


Regards,
John Ralls



___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Switching keyboard layouts with Alt+Cmd+Space

2014-01-19 Thread Andrius
Cody,

I think Alt+Cmd+Space is special case.
1. In Apple documentation there is statement that currently there is no way to 
know which shortcut does what action. You can only get the list of the 
shortcuts (like in patch You submitted for 711019), but You could not get 
information what some particular shortcut is responsible for.
2. Even when we pass Alt+Cmd+Space back to the system (by returning 
GDK_NOTHING), it does not work as it should (see my comment in bug 711019 
thread) for some reason. So, there is no sense to listen to anything, since we 
a) do not know what action we should do; b) we do not know how to do it 
properly.
All this means, that we have to define action for Alt+Cmd+Space inside gtk or 
gdk or somewhere else. I do not feel competent enough to answer where... I am 
counting on You guys to give me some hints...

Andrius




 From: Cody Russell brats...@gnome.org
To: Andrius andri...@yahoo.com 
Cc: John Ralls jra...@ceridwen.us; gtk-osx-users-list@gnome.org 
gtk-osx-users-list@gnome.org 
Sent: Sunday, January 19, 2014 7:44 PM
Subject: Re: [gtk-osx-users] Switching keyboard layouts with Alt+Cmd+Space
 


It seems like we want to change the way we do events so that rather than just 
emitting a signal to all interested parts of the application, we emit a signal 
and get a response from the listeners that tells whether they actually did 
anything in response to the signal.


I haven't investigated further to see if this can be done without breaking ABI.



___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Switching keyboard layouts with Alt+Cmd+Space

2014-01-20 Thread Andrius

I agree that we don’t want to load up gdkkeys-quartz with a bunch of 
special cases, but it seems like a lot of work for something you don’t 
expect to get pushed. In any case, sharing it on the bug is more 
effective because Kris and Mitch don’t AFAIK read this list, but they do
 carry a lot of weight in deciding what gets done about gtk-quartz 
issues. BTW, you should be doing work like that in a private git branch 
and using git format patch to make the patch, both to be acceptable to 
Gnome and to protect your sanity while developing it. 


OK, I will add my patch and other suggestions to 711019. 

With set_use_quartz_accelerators enabled, you should also see all of the other 
Apple-defined accelerators working properly as well: It grabs the accelerator 
and passes it to the Quartz responder chain. If Quartz 
doesn’t eat it, it passes it on to Gtk. The problem with it is that if 
there’s a binding overloading an accelerator, as is common with 
Cmd-(X|C|V), the accelerator is fired instead of the binding. This 
causes the owner of the menu to respond to the event rather than the 
widget with current keyboard focus, preventing you from e.g. cutting or 
pasting into dialog boxes.

Indeed, now I noticed the problem with set_use_quartz_accelerators(). When I 
enable it, all widget bindings stops working (with Cmd-X|C|V in dialog boxes 
being most painful loss). But I am nor seeing *ALL* Apple-defined accelarators 
working properly. As I already mentioned, Alt+Cmd+Space does not work (probably 
I did not understand properly what Apple-defined accelerator means, sorry).
In any case loss of widget bindings is a too big loss, and probably we have to 
look for some other solution. Right now I think that modifying gdkkeys-quartz 
is simplest one, but I agree that it is not universal, and not for everyone. It 
is as You pointed, a special case.
___
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


[gtk-osx-users] Gtk-osx on Big Sur

2020-11-16 Thread Andrius Rinkevicius via gtk-osx-users-list
Hi all,
does anybody have any experience how gtk-osx operates on the Big Sur?
I have one user reporting that that Bluefish has very slow or broken
scrolling of textview, also some modal windows are broken (looks like Big
Sur converted them to tabs). Bluefish is build using gtk 3.6.4 and XCode
6.3, so these problems might be caused by old build system.
Looking forward for any hints...
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Gtk-osx on Big Sur

2020-11-18 Thread Andrius Rinkevicius via gtk-osx-users-list
On Mon, Nov 16, 2020 at 11:59 PM John Ralls  wrote:

>
>
> > On Nov 16, 2020, at 9:09 AM, Andrius Rinkevicius via gtk-osx-users-list <
> gtk-osx-users-list@gnome.org> wrote:
> >
> > Hi all,
> > does anybody have any experience how gtk-osx operates on the Big Sur?
> > I have one user reporting that that Bluefish has very slow or broken
> scrolling of textview, also some modal windows are broken (looks like Big
> Sur converted them to tabs). Bluefish is build using gtk 3.6.4 and XCode
> 6.3, so these problems might be caused by old build system.
> > Looking forward for any hints...
>
> gtk-osx works fine on BigSur, though not all dependencies yet work on
> Apple Silicon (especially those that use assembler, no surprise).
>
> gtk-osx hasn't supported Gtk 3.6.4 nor Xcode 6.3 for at least 5 years so
> you're obviously not using it to build Bluefish. Maybe you should start...
>
> FWIW, GnuCash and Gramps *do* use gtk-osx to build their Mac bundles and
> they do work well on BigSur, including in Rosetta2 on Apple Silicon.
>
>
> I would like to keep support for MacOSX 10.9 and avoid building separate
binaries for different MacOS versions. It turned out that is hard to find
information what minimum MACOSX_DEPLOYMENT_TARGET particular Xcode version
supports. At least, I could not find it on wikipedia etc. Could you help to
select right Xcode version if I target minimum OSX version to be 10.9, and
want to have it working on BigSur at the same time?
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Gtk-osx on Big Sur

2020-11-18 Thread Andrius Rinkevicius via gtk-osx-users-list
On Wed, Nov 18, 2020 at 5:26 PM John Ralls  wrote:

>
>
> > On Nov 18, 2020, at 1:02 AM, Andrius Rinkevicius 
> wrote:
> >
> > On Mon, Nov 16, 2020 at 11:59 PM John Ralls  wrote:
> >
> >
> > > On Nov 16, 2020, at 9:09 AM, Andrius Rinkevicius via
> gtk-osx-users-list  wrote:
> > >
> > > Hi all,
> > > does anybody have any experience how gtk-osx operates on the Big Sur?
> > > I have one user reporting that that Bluefish has very slow or broken
> scrolling of textview, also some modal windows are broken (looks like Big
> Sur converted them to tabs). Bluefish is build using gtk 3.6.4 and XCode
> 6.3, so these problems might be caused by old build system.
> > > Looking forward for any hints...
> >
> > gtk-osx works fine on BigSur, though not all dependencies yet work on
> Apple Silicon (especially those that use assembler, no surprise).
> >
> > gtk-osx hasn't supported Gtk 3.6.4 nor Xcode 6.3 for at least 5 years so
> you're obviously not using it to build Bluefish. Maybe you should start...
> >
> > FWIW, GnuCash and Gramps *do* use gtk-osx to build their Mac bundles and
> they do work well on BigSur, including in Rosetta2 on Apple Silicon.
> >
> >
> > I would like to keep support for MacOSX 10.9 and avoid building separate
> binaries for different MacOS versions. It turned out that is hard to find
> information what minimum MACOSX_DEPLOYMENT_TARGET particular Xcode version
> supports. At least, I could not find it on wikipedia etc. Could you help to
> select right Xcode version if I target minimum OSX version to be 10.9, and
> want to have it working on BigSur at the same time?
>
> You want the newest Xcode that has a 10.9 SDK. In my collection of antique
> Xcodes 6.4 is the latest one, it has 10.9 and 10.10. I don't have Xcode 7
> or 7.1 and 7.2 has the 10.11 SDK only. There's probably not much advantage
> to moving from Xcode 6.3 to 6.4.
>
> You'll get some improvement by building the latest Gtk (3.24.23) and
> dependencies, particularly for full-screen and the macOS applied tabs.
>
> Note that this list is for supporting developers who build with gtk-osx.
> It's not a general-purpose Gtk on macOS support channel.
>
>
> Actually, I am user of gtx-osx since 2013, and Bluefish is build with
gtx-osx, just build system was setup back in 2014, when gtk-3.6.4 was most
recent stable release. I think thats indication of gtk code quality and
Apple reliability, that the same computer from 2014 is still performing
well. I just did not wanted to break the system that is not broken, and
now, well, BigSur seems finally did it.
Now just trying to figure out whether patching gdk on 3.6.4 or switching to
3.24.23 would be easier.
Regards,
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


[gtk-osx-users] Publishing MacOS bundle on App Store

2021-01-23 Thread Andrius Rinkevicius via gtk-osx-users-list
Hi All,
does anybody have experience with publishing MacOS bundle made with gtk-osx
on Apple App Store? Is there any success story?
I would be grateful for any hints is that is possible and what needs to be
done... I am currently maintaining Bluefish MacOS build and wondering if
there are any chances ti build it  for App Store.
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Annual Updates

2021-04-06 Thread Andrius Rinkevicius via gtk-osx-users-list
On Tue, Apr 6, 2021 at 4:13 AM John Ralls  wrote:

> I'm preparing the annual updates to the stable packages and in the process
> I'm making some changes that could break build scripts and jhbuildrc-custom:
>
> I haven't pushed any of this yet so if there are any objections now is the
> time to raise them!
>
> Regards,
> John Ralls
>
>
Hi John,
I would like to suggest to change a bit enchant build module - to build
native Apple spellchecker instead of ispell and myspell it is currently
buiding. I do not have any objections to continue to build ispell or
myspell, however, in order to enable its functionality one has to add
external dictionaries somehow (I never tried), while applespell works out
of the box and uses native Apple spellchecker.
Gedit is already doing this, and its enchant module is:



  
  
  


  

  

There is one extra patch for applespell, and enchant-relocatable.patch is a
bit different to what is available on gtk-osx repository. I have confirmed,
gedit version works!
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


[gtk-osx-users] How do not rebuild complete module if only one source file was changed

2021-03-18 Thread Andrius Rinkevicius via gtk-osx-users-list
Hi all,
I am wondering, if there is way to do not rebuild gtk completely if I made
changes just to one (or few) source files.
Right now I am using
jhbuild buildone gtk+-3.0 -nf
It recompiles all files, which takes ~10 minutes on my machine. If I try
jhbuild buildone gtk+-3.0 -nc
then it says that nothing changed, and does not build at all. Is there a
way to force rebuild only for files that have changed?
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Crash of jhbuild at install phase

2021-02-25 Thread Andrius Rinkevicius via gtk-osx-users-list
On Thu, Feb 25, 2021 at 9:56 AM Andrius Rinkevicius 
wrote:

> On Thu, Feb 25, 2021 at 3:45 AM John Ralls  wrote:
>
>>
>>
>> > On Feb 24, 2021, at 11:05 AM, Andrius Rinkevicius via
>> gtk-osx-users-list  wrote:
>> >
>> > Hi all,
>> > I am getting crash when building my own program using custom moduleset.
>> > configure, build and install steps all are OK, however, jhbuild fails
>> at final move of build files to ~/gtk/inst/.
>> > The traceback is
>> > W: Ignoring uninstalled package: bluefish
>> > Traceback (most recent call last):
>> >   File "/Users/andrius/.new_local/libexec/run_jhbuild.py", line 17, in
>> 
>> > jhbuild.main.main(sys.argv[1:])
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/main.py", line 120, in
>> main
>> > rc = jhbuild.commands.run(command, config, args, help=lambda:
>> print_help(parser))
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py",
>> line 188, in run
>> > return cmd.execute(config, args, help)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py",
>> line 56, in execute
>> > return self.run(config, options, args, help)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/base.py", line
>> 341, in run
>> > return build.build()
>> >   File
>> "/Users/andrius/Source/jhbuild/jhbuild/frontends/buildscript.py", line 172,
>> in build
>> > error, altphases = module.run_phase(self, phase)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py",
>> line 420, in run_phase
>> > method(buildscript)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/autotools.py",
>> line 320, in do_install
>> > self.process_install(buildscript, self.get_revision())
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py",
>> line 317, in process_install
>> > new_contents = fileutils.accumulate_dirtree_contents(destdir_prefix)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line
>> 44, in accumulate_dirtree_contents
>> > _accumulate_dirtree_contents_recurse(path, contents)
>> >   File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line
>> 26, in _accumulate_dirtree_contents_recurse
>> > names = os.listdir(path)
>> > FileNotFoundError: [Errno 2] No such file or directory:
>> '/Users/andrius/gtk/inst/_jhbuild/root-bluefish/Users/andrius/gtk/inst'
>> >
>> > I looks strange that it appends prefix at the end of path, however, as
>> far as I can see this is done
>> fileutils.accumulate_dirtree_contents(destdir_prefix), it is intended.
>> > I am not sure if this is gtk-osx or jhbuild related bug, however, it
>> seems that there are no such a n errors reported on jhbuild bug tracker.
>> > I can see all build files located in
>> '/Users/andrius/gtk/inst/_jhbuild/root-bluefish, so why there is extra part
>> added is hard to say. From the other hand, I have build complete gkt+ stack
>> without any issues, just one particular program fails without apparent
>> reason.
>> > Another strange thing is that it says "W: Ignoring uninstalled package:
>> bluefish", while package is not uninstalled, it stays in source three.
>> However, since it was installed via svn type repo, there is no package in
>> pkgs folder.
>> > Any hints what to look for would be useful!
>>
>> Andrius,
>>
>> jhbuild does a two-step install. It first runs make or ninja install with
>> DESTDIR=$PREFIX/_jhbuild/root-project-name; make/ninja is supposed to
>> install to $DESTDIR/$PREFIX. Once make/ninja reports that the install
>> completed normally jhbuild moves everything to $PREFIX and deletes $DESTDIR.
>>
>> So if the files wound up as e.g. $DESTDIR/bin/bluefish instead of
>> $DESTDIR/$PREFIX/bin/bluefish then when jhbuild went back to do the move it
>> wouldn't be able to find the files. That's where I'd start investigating:
>>
>> 'Ignoring uninstalled package:' is from the triggers feature. I don't
>> know anything about that, but there's a triggers/README in the jhbuild
>> source tree with a brief description.
>>
>> Regards,
>> John Ralls
>>
>>
>> John,
> on occasion I learned more about jhbuild internals, which is nice. In the
> past I was doing some hacks for building, however, it seems that actually I
> could have

Re: [gtk-osx-users] Crash of jhbuild at install phase

2021-02-24 Thread Andrius Rinkevicius via gtk-osx-users-list
On Thu, Feb 25, 2021 at 3:45 AM John Ralls  wrote:

>
>
> > On Feb 24, 2021, at 11:05 AM, Andrius Rinkevicius via gtk-osx-users-list
>  wrote:
> >
> > Hi all,
> > I am getting crash when building my own program using custom moduleset.
> > configure, build and install steps all are OK, however, jhbuild fails at
> final move of build files to ~/gtk/inst/.
> > The traceback is
> > W: Ignoring uninstalled package: bluefish
> > Traceback (most recent call last):
> >   File "/Users/andrius/.new_local/libexec/run_jhbuild.py", line 17, in
> 
> > jhbuild.main.main(sys.argv[1:])
> >   File "/Users/andrius/Source/jhbuild/jhbuild/main.py", line 120, in main
> > rc = jhbuild.commands.run(command, config, args, help=lambda:
> print_help(parser))
> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py",
> line 188, in run
> > return cmd.execute(config, args, help)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py",
> line 56, in execute
> > return self.run(config, options, args, help)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/commands/base.py", line
> 341, in run
> > return build.build()
> >   File "/Users/andrius/Source/jhbuild/jhbuild/frontends/buildscript.py",
> line 172, in build
> > error, altphases = module.run_phase(self, phase)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py",
> line 420, in run_phase
> > method(buildscript)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/autotools.py",
> line 320, in do_install
> > self.process_install(buildscript, self.get_revision())
> >   File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py",
> line 317, in process_install
> > new_contents = fileutils.accumulate_dirtree_contents(destdir_prefix)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line
> 44, in accumulate_dirtree_contents
> > _accumulate_dirtree_contents_recurse(path, contents)
> >   File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line
> 26, in _accumulate_dirtree_contents_recurse
> > names = os.listdir(path)
> > FileNotFoundError: [Errno 2] No such file or directory:
> '/Users/andrius/gtk/inst/_jhbuild/root-bluefish/Users/andrius/gtk/inst'
> >
> > I looks strange that it appends prefix at the end of path, however, as
> far as I can see this is done
> fileutils.accumulate_dirtree_contents(destdir_prefix), it is intended.
> > I am not sure if this is gtk-osx or jhbuild related bug, however, it
> seems that there are no such a n errors reported on jhbuild bug tracker.
> > I can see all build files located in
> '/Users/andrius/gtk/inst/_jhbuild/root-bluefish, so why there is extra part
> added is hard to say. From the other hand, I have build complete gkt+ stack
> without any issues, just one particular program fails without apparent
> reason.
> > Another strange thing is that it says "W: Ignoring uninstalled package:
> bluefish", while package is not uninstalled, it stays in source three.
> However, since it was installed via svn type repo, there is no package in
> pkgs folder.
> > Any hints what to look for would be useful!
>
> Andrius,
>
> jhbuild does a two-step install. It first runs make or ninja install with
> DESTDIR=$PREFIX/_jhbuild/root-project-name; make/ninja is supposed to
> install to $DESTDIR/$PREFIX. Once make/ninja reports that the install
> completed normally jhbuild moves everything to $PREFIX and deletes $DESTDIR.
>
> So if the files wound up as e.g. $DESTDIR/bin/bluefish instead of
> $DESTDIR/$PREFIX/bin/bluefish then when jhbuild went back to do the move it
> wouldn't be able to find the files. That's where I'd start investigating:
>
> 'Ignoring uninstalled package:' is from the triggers feature. I don't know
> anything about that, but there's a triggers/README in the jhbuild source
> tree with a brief description.
>
> Regards,
> John Ralls
>
>
> John,
on occasion I learned more about jhbuild internals, which is nice. In the
past I was doing some hacks for building, however, it seems that actually I
could have used jhbuild functionality to do the same.
I am using autotools (make) to build my program.
It seems that jhbuild operates not exactly how you described.
$PREFIX on my system is set to /Users/andrius/gtk/inst (judging by --prefix
during autogen). This is getting set in jhbuildrc file, I think.
Install is done with following command:
make DESTDIR=/Users/andrius/gtk/inst/_jhbuild/root-bluefish install
and then make adds its own prefix /us

Re: [gtk-osx-users] Annual Updates

2021-04-07 Thread Andrius Rinkevicius via gtk-osx-users-list
On Tue, Apr 6, 2021 at 7:08 PM John Ralls  wrote:

>
>
> > On Apr 6, 2021, at 1:25 AM, Andrius Rinkevicius 
> wrote:
> >
> >
> >
> > On Tue, Apr 6, 2021 at 4:13 AM John Ralls  wrote:
> > I'm preparing the annual updates to the stable packages and in the
> process I'm making some changes that could break build scripts and
> jhbuildrc-custom:
> >
> > I haven't pushed any of this yet so if there are any objections now is
> the time to raise them!
> >
> > Regards,
> > John Ralls
> >
> >
> > Hi John,
> > I would like to suggest to change a bit enchant build module - to build
> native Apple spellchecker instead of ispell and myspell it is currently
> buiding. I do not have any objections to continue to build ispell or
> myspell, however, in order to enable its functionality one has to add
> external dictionaries somehow (I never tried), while applespell works out
> of the box and uses native Apple spellchecker.
> > Gedit is already doing this, and its enchant module is:
> >
> > 
> >  repo="abisource/enchant">
> >   
> >   
> >   
> > 
> > 
> >   
> > 
> >   
> >
> > There is one extra patch for applespell, and enchant-relocatable.patch
> is a bit different to what is available on gtk-osx repository. I have
> confirmed, gedit version works!
>
> Andrius,
>
> Sure, no problem. How about a PR on
> https://github.com/jralls/gtk-osx-build or
> https://gitlab.gnome.org/GNOME/gtk-osx?
>
> Regards,
> John Ralls
>
>
> Hi John,
made PR to Github repository.
Andrius
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] Annual Updates

2021-04-12 Thread Andrius Rinkevicius via gtk-osx-users-list
Want to make one small correction - it is true that Bluefish can use
enchant 2.2, however, it will happily accept 1.6, 1.3, or even older. We
support as wide as possible range of platforms, and try to do not break
things that are working.
Probably because of Gspell freeze there is some activity on gtk:
https://gitlab.gnome.org/GNOME/gtk/-/issues/3814 . Its for gtk4 only,
though.
Andrius

On Fri, Apr 9, 2021 at 10:07 PM John Ralls  wrote:

>
>
> > On Apr 9, 2021, at 11:02 AM, John Ralls  wrote:
> >
> >
> >
> >> On Apr 7, 2021, at 7:31 AM, Andrius Rinkevicius 
> wrote:
> >>
> >>
> >>
> >> On Tue, Apr 6, 2021 at 7:08 PM John Ralls  wrote:
> >>
> >>
> >>> On Apr 6, 2021, at 1:25 AM, Andrius Rinkevicius 
> wrote:
> >>>
> >>>
> >>>
> >>> On Tue, Apr 6, 2021 at 4:13 AM John Ralls  wrote:
> >>> I'm preparing the annual updates to the stable packages and in the
> process I'm making some changes that could break build scripts and
> jhbuildrc-custom:
> >>>
> >>> I haven't pushed any of this yet so if there are any objections now is
> the time to raise them!
> >>>
> >>> Regards,
> >>> John Ralls
> >>>
> >>>
> >>> Hi John,
> >>> I would like to suggest to change a bit enchant build module - to
> build native Apple spellchecker instead of ispell and myspell it is
> currently buiding. I do not have any objections to continue to build ispell
> or myspell, however, in order to enable its functionality one has to add
> external dictionaries somehow (I never tried), while applespell works out
> of the box and uses native Apple spellchecker.
> >>> Gedit is already doing this, and its enchant module is:
> >>>
> >>> 
> >>> repo="abisource/enchant">
> >>>  
> >>>  
> >>>  
> >>>
> >>>
> >>>  
> >>>
> >>>  
> >>>
> >>> There is one extra patch for applespell, and enchant-relocatable.patch
> is a bit different to what is available on gtk-osx repository. I have
> confirmed, gedit version works!
> >>
> >> Andrius,
> >>
> >> Sure, no problem. How about a PR on
> https://github.com/jralls/gtk-osx-build or
> https://gitlab.gnome.org/GNOME/gtk-osx?
> >>
> >> Regards,
> >> John Ralls
> >>
> >>
> >> Hi John,
> >> made PR to Github repository.
> >> Andrius
> >
> > I turns out that Andrius was a little off-base: GEdit uses GSpell which
> in turn uses Enchant 2.2. Enchant 2.2 claims to support AppleSpell as-is.
> Even Andrius's own project, Bluefish, uses Enchant 2.2.
> >
> > Enchant 2 is about 3 1/2 years old and Enchant 1 isn't maintained any
> more, so it's obsolete. So, for that matter, is GtkSpell, which also hasn't
> had any love for 3 years or so. Hunspell's last release was 2 1/2 years ago
> and while there was a flurry of activity a year go the total is only 11
> commits since and none in the last year.
> >
> > There's no module in Gtk-OSX for GSpell and nobody's ever asked for one,
> so I'm inclined to declare that spelling infrastructure is out-of-scope for
> Gtk-OSX; projects that need it are probably using their own modules.
> >
> > Can anyone make a convincing case to the contrary?
>
> Update: It turns out that the GSpell maintainer abandoned ship earlier
> this week, see
> https://gitlab.gnome.org/GNOME/gspell/-/commit/9ee66534fcca2f971461fb8dfe709e55fc118f84
>
> Seems quite sudden. I could find no explanation.
>
> Regards,
> John Ralls
>
> ___
> gtk-osx-users-list mailing list
> gtk-osx-users-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list
>
___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list