Skip to content

Commit

Permalink
Merge pull request #17 from anaselli/master
Browse files Browse the repository at this point in the history
Added title and icon management to YGAplication
  • Loading branch information
tgoettlicher committed Nov 9, 2012
2 parents 2b00508 + ab7dca0 commit 5ddffe8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Nov 2 19:19:27 CET 2012 - anaselli@linux.it

- Used YApplication::applicationTitle() and
YApplication::applicationIcon() to set title and icon
- Reimplemented setApplicationTitle from YApplication
- Fixed YAlignment::setBackgroundPixmap crash

-------------------------------------------------------------------
Tue Sep 4 14:35:20 CEST 2012 - tgoettlicher@suse.de

Expand Down
17 changes: 16 additions & 1 deletion src/YGDialog.cc
Expand Up @@ -91,7 +91,22 @@ class YGWindow
atk_object_set_role (peer, ATK_ROLE_DIALOG);
}
else {
gtk_window_set_title (window, "YaST");
#ifdef LIBYUI_VERSION_NUM
#if LIBYUI_VERSION_AT_LEAST(2,42,3)
gtk_window_set_title (window, YUI::app()->applicationTitle().c_str());
GdkPixbuf *pixbuf = YGUtils::loadPixbuf (YUI::app()->applicationIcon());
if (pixbuf) { // default window icon
gtk_window_set_default_icon (pixbuf);
g_object_unref (G_OBJECT (pixbuf));
}
#else
// to be back compatible
gtk_window_set_title (window, "YaST");
#endif
#else
// to be back compatible
gtk_window_set_title (window, "YaST");
#endif
if (YGUI::ui()->unsetBorder())
gtk_window_set_decorated (window, FALSE);
}
Expand Down
2 changes: 1 addition & 1 deletion src/YGUI.h
Expand Up @@ -215,7 +215,7 @@ class YGApplication : public YApplication
#endif

virtual bool openContextMenu (const YItemCollection &itemCollection);

private:
// for screenshots:
std::map <std::string, int> screenShotNb;
Expand Down

0 comments on commit 5ddffe8

Please sign in to comment.