Skip to content

Commit

Permalink
Simplify about dialog logo handling by installing Reinteract.ico
Browse files Browse the repository at this point in the history
data/Makefile.am: Install Reinteract.ico in $pkgdatadir
bin/reinteract.in: Use installed Reinteract.ico for icon_file
AboutDialog: Always use Reinteract.ico and never the named icon
src/reinteract_wrapper_osx/main.m Makefile.am: Use Reinteract.ico
  for the 'make install' case.
  • Loading branch information
owtaylor committed Mar 21, 2009
1 parent 44804fc commit a790916
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ INCLUDES = \
$(PYTHON_INCLUDES) \
$(WRAPPER_CFLAGS) \
-DEXAMPLESDIR=\"$(examplesdir)\" \
-DDIALOGSDIR=\"$(pkgdatadir)/dialogs\"
-DDIALOGSDIR=\"$(pkgdatadir)/dialogs\" \
-DICONDIR=\"$(pkgdatadir)\"

ReinteractWrapper_LDFLAGS = -framework Cocoa $(PYTHON_LIBS)

Expand Down
1 change: 1 addition & 0 deletions bin/reinteract.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ prefix="@prefix@"
datarootdir="@datarootdir@".replace("${prefix}", prefix)
global_settings.dialogs_dir = os.path.join(datarootdir, "reinteract", "dialogs")
global_settings.examples_dir = os.path.join(datarootdir, "reinteract", "examples")
global_settings.icon_file = os.path.join(datarootdir, "reinteract", "Reinteract.ico")
global_settings.version = "@VERSION@"

if __name__ == "__main__":
Expand Down
5 changes: 4 additions & 1 deletion data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ desktop_DATA = reinteract.desktop
mimedir = $(datadir)/mime/packages
mime_DATA = reinteract.xml

# Install the ICO to use in the About dialog
pkgdata_DATA= \
Reinteract.ico

EXTRA_DIST= \
$(desktop_DATA) \
$(icon_DATA) \
Expand All @@ -15,7 +19,6 @@ EXTRA_DIST= \
MainMenu.nib/classes.nib \
MainMenu.nib/info.nib \
MainMenu.nib/keyedobjects.nib \
Reinteract.ico \
Reinteract.icns

# Calling update-mime-database is necessary to get the associations
Expand Down
7 changes: 2 additions & 5 deletions lib/reinteract/about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ def __init__(self):

gtk.AboutDialog.__init__(self)
self.set_name("Reinteract")
if global_settings.icon_file:
icon = gtk.gdk.pixbuf_new_from_file_at_size(global_settings.icon_file, 64, 64)
self.set_logo(icon)
else:
self.set_logo_icon_name("reinteract")
icon = gtk.gdk.pixbuf_new_from_file_at_size(global_settings.icon_file, 64, 64)
self.set_logo(icon)
self.set_version(global_settings.version)
self.set_copyright("Copyright \302\251 2007-2009 Owen Taylor, Red Hat, Inc., and others")
self.set_website("http://www.reinteract.org")
Expand Down
1 change: 1 addition & 0 deletions src/reinteract_wrapper_osx/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ int main(int argc, char *argv[])
} else {
dialogsDir = @DIALOGSDIR;
examplesDir = @EXAMPLESDIR;
iconFile = @ICONDIR "/Reinteract.ico";
}

/* Set attributes in the global_settings objects */
Expand Down

0 comments on commit a790916

Please sign in to comment.