Re: works inside MSYS2 but not outside ?

2017-10-12 Thread Tilo Villwock
Hello Eddie,

as a general recommendation: tone it down a little. So far we've seen
you either insult everybody or fake humbleness. Neither is really
appreciated.

As for your problem: You still haven't stated which exact GTK version
your using. And you haven't provided any output from your actual crash
either. That would be kind of helpful.

Also making a call to `gtk_native_dialog_destroy` immediately after
`gtk_native_dialog_show` will prevent the user from ever seeing the
dialog.

You should use `gtk_native_dialog_run` as described here:

https://developer.gnome.org/gtk3/stable/gtk3-GtkNativeDialog.html#gtk-n
ative-dialog-run

Good luck.

Tilo


Am Mittwoch, den 11.10.2017, 23:17 +0200 schrieb Bruggemann Eddie:
> Hi to all the Gtk team,
> 
> At first I want to excuse me for all the insanity I have written
> newly 
> on this mailing-list.
> 
> I was in hate and it's surely my fault when my program crash not the 
> fault of the Gtk maintainers.
> 
> ---
> 
> I go into my problem:
> 
> Try it out Like this:
> 
> [CODE]
> 
> #include 
> 
> static void create_win32_native_file_chooser(GtkWidget *widget,
> gpointer 
> user_data)  ;
> 
> static void create_win32_native_file_chooser(GtkWidget *widget,
> gpointer 
> user_data) {
> 
>GtkWidget *window = gtk_widget_get_toplevel(widget) ;
> 
>GtkFileChooserNative *win32_native_file_chooser = 
> gtk_file_chooser_native_new("title",
> GTK_WINDOW(window),
> GTK_FILE_CHOOSER_ACTION_SAVE,
>"accept label",
>"cancel label") ;
> 
> gtk_native_dialog_show(GTK_NATIVE_DIALOG(win32_native_file_chooser))
> ;
> 
> gtk_native_dialog_destroy(GTK_NATIVE_DIALOG(win32_native_file_chooser
> )) ;
> 
>return ;
> 
> }
> 
> 
> int main (int argc, char *argv[]) {
> 
>gtk_init(, ) ;
> 
>GtkWidget *window, *button ;
> 
>window = gtk_window_new(GTK_WINDOW_TOPLEVEL) ;
> 
>button= gtk_button_new_with_label("test") ;
> 
>g_signal_connect(button, "clicked", 
> G_CALLBACK(create_win32_native_file_chooser) , NULL);
> 
>gtk_container_add(GTK_CONTAINER(window), button) ;
> 
>gtk_main() ;
> 
>return 0 ;
> }
> 
> [/CODE]
> 
> Compile it with MSYS2.
> 
> ---
> 
> Then make a directory outside the MSYS2 environment (the $PATH must
> be 
> clean without MSYS2).
> 
> And execute this script given binary and directory:
> 
> [CODE]
> 
> #! /bin/bash
> 
> ###
> # #
> # A script for mingw distributing copying #
> # every needed *.dll to destination given #
> # as argument ($2),   #
> # from binary given as argument ($1)  #
> # #
> ###
> 
> function usage {
> 
>echo "a script to copy all required dll files from a binary to a 
> destdir."
>echo "usage: $0 pathtobin destdir"
> 
>exit 1
> 
> }
> 
> if [[ ! -f $1 ]] || [[ ! -d $2 ]] ; then
> 
>usage ;
> 
> else
> 
>ldd $1 | grep /mingw64/bin/ | cp $(gawk '{print $3}' ) $2
> 
>ldd $1 | grep /mingw64/bin/ | echo "$(gawk '{print $3}' )"
> 
># A try for cygwin:
>#
>#objdump -p $1 | grep "DLL Name" | cp $(printf "%s%s" 
> "/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}'))
> $2
> 
>#objdump -p $1 | grep "DLL Name" | echo $(printf "%s%s" 
> "/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}'))
> 
>echo "copy to $2"
> 
>cp $1 $2
> 
>echo "copy $1 to $2"
> 
>exit 0 ;
> 
> fi
> 
> [/CODE]
> 
> Then execute the binary at the location outside the MSYS2
> environment.
> 
> 
> It crash on my system.
> 
> Please forgiven me !
> 
> I'm a poor sinner for all the injuries I have said.
> 
> 
> If we find what bug I can package my program using inno-setup what
> would 
> be great and not hope.
> 
> Thanks to forgiven me, and for any help or comments.
> 
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


works inside MSYS2 but not outside ?

2017-10-11 Thread Bruggemann Eddie

Hi to all the Gtk team,

At first I want to excuse me for all the insanity I have written newly 
on this mailing-list.


I was in hate and it's surely my fault when my program crash not the 
fault of the Gtk maintainers.


---

I go into my problem:

Try it out Like this:

[CODE]

#include 

static void create_win32_native_file_chooser(GtkWidget *widget, gpointer 
user_data)  ;


static void create_win32_native_file_chooser(GtkWidget *widget, gpointer 
user_data) {


  GtkWidget *window = gtk_widget_get_toplevel(widget) ;

  GtkFileChooserNative *win32_native_file_chooser = 
gtk_file_chooser_native_new("title",

GTK_WINDOW(window),
GTK_FILE_CHOOSER_ACTION_SAVE,
  "accept label",
  "cancel label") ;

gtk_native_dialog_show(GTK_NATIVE_DIALOG(win32_native_file_chooser)) ;

gtk_native_dialog_destroy(GTK_NATIVE_DIALOG(win32_native_file_chooser)) ;

  return ;

}


int main (int argc, char *argv[]) {

  gtk_init(, ) ;

  GtkWidget *window, *button ;

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL) ;

  button= gtk_button_new_with_label("test") ;

  g_signal_connect(button, "clicked", 
G_CALLBACK(create_win32_native_file_chooser) , NULL);


  gtk_container_add(GTK_CONTAINER(window), button) ;

  gtk_main() ;

  return 0 ;
}

[/CODE]

Compile it with MSYS2.

---

Then make a directory outside the MSYS2 environment (the $PATH must be 
clean without MSYS2).


And execute this script given binary and directory:

[CODE]

#! /bin/bash

###
# #
# A script for mingw distributing copying #
# every needed *.dll to destination given #
# as argument ($2),   #
# from binary given as argument ($1)  #
# #
###

function usage {

  echo "a script to copy all required dll files from a binary to a 
destdir."

  echo "usage: $0 pathtobin destdir"

  exit 1

}

if [[ ! -f $1 ]] || [[ ! -d $2 ]] ; then

  usage ;

else

  ldd $1 | grep /mingw64/bin/ | cp $(gawk '{print $3}' ) $2

  ldd $1 | grep /mingw64/bin/ | echo "$(gawk '{print $3}' )"

  # A try for cygwin:
  #
  #objdump -p $1 | grep "DLL Name" | cp $(printf "%s%s" 
"/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}')) $2


  #objdump -p $1 | grep "DLL Name" | echo $(printf "%s%s" 
"/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" $(gawk '{print $3}'))


  echo "copy to $2"

  cp $1 $2

  echo "copy $1 to $2"

  exit 0 ;

fi

[/CODE]

Then execute the binary at the location outside the MSYS2 environment.


It crash on my system.

Please forgiven me !

I'm a poor sinner for all the injuries I have said.


If we find what bug I can package my program using inno-setup what would 
be great and not hope.


Thanks to forgiven me, and for any help or comments.


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list