Show dialog after hide another

2017-09-06 Thread Rúben Rodrigues
Hi guys,


I have i problem when trying to hide a dialog and show another at the 
same moment.

I have a dialog that have an OK button that calls this function:

void on_button_Util_Firmware_Update_clicked(GtkButton *button, gpointer 
user_data)
{
     GtkLabel    *gLabel_Result;
     FILE        *fp;
     gchar        pcTmp[BUFSIZ];

     // Fecha a janela.
gtk_widget_hide(GTK_WIDGET(gtk_widget_get_toplevel(GTK_WIDGET(button;

     // Mostra a janela de espera.
     gtk_widget_show(GTK_WIDGET(gtk_builder_get_object(builder, 
"Setup_Wait_dialog")));
     sleep(10);

  //**Running something inside

// Esconde a janela de espera.
     gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(builder, 
"Setup_Wait_dialog")));

}

As you can see this is a Waiting dialog to show the status of the 
process, but the problem is  that don't show the Setup_Wait_dialog and 
don't hides the first dialog. What's wrong?

Thanks


---
Este e-mail foi verificado em termos de vírus pelo software antivírus Avast.
https://www.avast.com/antivirus

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

Re: gdk_pixbuf_new_from_inline to Gresource conversion

2017-09-06 Thread Emmanuele Bassi
On 6 September 2017 at 13:55, Charles Curley
 wrote:
> On Wed, 6 Sep 2017 11:22:25 +0100
> Chris Vine  wrote:
>
>> I am not going to answer your question I am afraid, but I am going to
>> make the observation that since GTK+2 will not be updated except for
>> bug fixes, unless you are thinking of porting your code to GTK+3 or
>> GTK+4 you might as well leave it as it is.  If the warning bothers
>> you, you can add -Wno-deprecated-declarations to your CFLAGS to
>> suppress it.

GdkPixbuf is separate from GTK+, so its deprecation warnings are
actually useful even if you're never going to port to newer GTK+
versions.

In this case, the idea is to remove the "inline image" support in
GdkPixbuf and replace it with GResources, which allow to portably and
safely embed any kind of resources inside the binary (either
application or shared library) or inside a blob that can be loaded at
run time.

More information about GResource is available here:
  https://developer.gnome.org/gio/stable/GResource.html

In short:

 - write an XML catalogue with the list of files to be included in the resource
 - generate the GResource from the catalogue using
`glib-compile-resources` as part of your build
  - you can either generate C source and header files, and compile
them into your own project
  - or you can generate a gresource binary blob and install it
somewhere alongside the rest of your project

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gdk_pixbuf_new_from_inline to Gresource conversion

2017-09-06 Thread Charles Curley
On Wed, 6 Sep 2017 11:22:25 +0100
Chris Vine  wrote:

> I am not going to answer your question I am afraid, but I am going to
> make the observation that since GTK+2 will not be updated except for
> bug fixes, unless you are thinking of porting your code to GTK+3 or
> GTK+4 you might as well leave it as it is.  If the warning bothers
> you, you can add -Wno-deprecated-declarations to your CFLAGS to
> suppress it.

Thanks, Chris.

I was afraid that might be the case.

As a general rule, I dislike code that litters the countryside with
warnings. Yeah, it compiles, and yeah, it runs, but those warnings are
usually there for a reason, and sometimes mask other more serious
problems. So I think it is best practice to not allow warnings to creep
into one's code.

As for porting to GTK+3 or 4, would I not have the same problem?

Enough venting. Thanks for the thought.

-- 

The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no Warrants shall issue, but upon probable cause,
supported by Oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.
-- U.S. Const. Amendment IV

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gdk_pixbuf_new_from_inline to Gresource conversion

2017-09-06 Thread Chris Vine
On Tue, 5 Sep 2017 16:39:12 -0600
Charles Curley  wrote:
[snip]
> The second one is new on debian 9. I have several options. The
> documentation for gdk_pixbuf_new_from_inline () indicates that it is
> deprecated and one should use a Gresource.
> 
> Question: how do I use a Gresource here?

I am not going to answer your question I am afraid, but I am going to
make the observation that since GTK+2 will not be updated except for bug
fixes, unless you are thinking of porting your code to GTK+3 or GTK+4
you might as well leave it as it is.  If the warning bothers you, you
can add -Wno-deprecated-declarations to your CFLAGS to suppress it.

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