Re: Title on gnome-shell

2018-02-28 Thread Takao Fujiwara

Thank you for your explanation.
I could get the title string in gnome-shell when I added the desktop files and 
changed GApplication to GtkApplication in my application.
Maybe the specification could be defined in freedesktop.org

On 02/28/18 02:45, Florian Müllner-san wrote:

On Tue, Feb 27, 2018 at 1:59 PM, Takao Fujiwara <fujiw...@redhat.com> wrote:

How can I set the title name of GtkWindow on gnome-shell?


gtk_window_set_title(), but that's probably not what you mean - there
are few places where gnome-shell uses the window title, in general the
application name is more prominent. For that it is important that
gnome-shell finds the .desktop file that corresponds to the window.
There are several options for making that work, most importantly:

  - use GtkApplication with an ID that corresponds to the .desktop file
(for example "com.example.Foo" and com.example.Foo.desktop)

  - set the WM_CLASS property to the .desktop file name
   (e.g. g_setprgname("foo-bar"); and foo-bar.desktop)

  - set the StartupWMClass field in the .desktop file to the WM_CLASS
of your program

Refer to https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
for more details.



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

Re: Title on gnome-shell

2018-02-27 Thread Florian Müllner
On Tue, Feb 27, 2018 at 1:59 PM, Takao Fujiwara  wrote:
> How can I set the title name of GtkWindow on gnome-shell?

gtk_window_set_title(), but that's probably not what you mean - there
are few places where gnome-shell uses the window title, in general the
application name is more prominent. For that it is important that
gnome-shell finds the .desktop file that corresponds to the window.
There are several options for making that work, most importantly:

 - use GtkApplication with an ID that corresponds to the .desktop file
   (for example "com.example.Foo" and com.example.Foo.desktop)

 - set the WM_CLASS property to the .desktop file name
  (e.g. g_setprgname("foo-bar"); and foo-bar.desktop)

 - set the StartupWMClass field in the .desktop file to the WM_CLASS
   of your program

Refer to https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
for more details.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Title on gnome-shell

2018-02-27 Thread Takao Fujiwara

How can I set the title name of GtkWindow on gnome-shell?
It seems Alt-Tab window and application list on gnome-shell shows the prgname 
but not application name.

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

  g_set_application_name ("Title");
  gtk_init (, );
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Title");
  gtk_widget_show_all (window);

  gtk_main ();
  return 0;
}


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