only set_icon when not in windows

This commit is contained in:
Marcos Pinto 2007-11-01 22:32:46 +00:00
parent 3c94a2039d
commit bd8329e971
2 changed files with 14 additions and 8 deletions

View File

@ -45,7 +45,8 @@ class PreferencesDlg:
if plugin_tab:
self.glade.get_widget("notebook").set_current_page(6)
self.dialog.set_position(gtk.WIN_POS_CENTER)
self.dialog.set_icon(common.get_logo(32))
if not common.windows_check():
self.dialog.set_icon(common.get_logo(32))
self.glade.signal_autoconnect({
'toggle_ui': self.toggle_ui,
'on_btn_testport_clicked': self.TestPort,
@ -378,7 +379,8 @@ class MergeDlg:
domain='deluge')
self.dialog = self.glade.get_widget("merge_dialog")
self.dialog.set_position(gtk.WIN_POS_CENTER)
self.dialog.set_icon(common.get_logo(32))
if not common.windows_check():
self.dialog.set_icon(common.get_logo(32))
def show(self, window):
self.dialog.set_transient_for(window)
@ -394,7 +396,8 @@ class FilesDlg:
domain='deluge')
self.dialog = self.glade.get_widget("file_dialog")
self.dialog.set_position(gtk.WIN_POS_CENTER)
self.dialog.set_icon(common.get_logo(32))
if not common.windows_check():
self.dialog.set_icon(common.get_logo(32))
self.files_manager = files.FilesDialogManager(
self.glade.get_widget("file_view"),
@ -436,7 +439,8 @@ def show_about_dialog(window):
abt.set_license(_("Deluge is free software, you can redistribute it and/or\nmodify it under the terms of the GNU General Public\n License as published by the Free Software Foundation,\neither version 2 of the License, or (at your option) any\nlater version. Deluge is distributed in the hope that it\nwill be useful, but WITHOUT ANY WARRANTY, without even \nthe implied warranty of MERCHANTABILITY or FITNESS\nFOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details. You should have received\na copy of the GNU General Public License along with\nDeluge, but if not, write to the Free Software Foundation,\n Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-\n1301 USA"))
abt.set_website("http://deluge-torrent.org")
abt.set_website_label("http://deluge-torrent.org")
abt.set_icon(common.get_logo(32))
if not common.windows_check():
abt.set_icon(common.get_logo(32))
abt.set_logo(gtk.gdk.pixbuf_new_from_file(
common.get_pixmap("deluge-about.png")))
abt.show_all()
@ -488,7 +492,8 @@ def show_file_open_dialog(parent, title=None):
chooser.set_current_folder(config.get("open_torrent_dialog_path"))
chooser.add_filter(f1)
chooser.set_select_multiple(True)
chooser.set_icon(common.get_logo(32))
if not common.windows_check():
chooser.set_icon(common.get_logo(32))
chooser.set_property("skip-taskbar-hint", True)
response = chooser.run()
@ -503,7 +508,8 @@ def show_file_open_dialog(parent, title=None):
def show_directory_chooser_dialog(parent, title):
chooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER,
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
chooser.set_icon(common.get_logo(32))
if not common.windows_check():
chooser.set_icon(common.get_logo(32))
chooser.set_property("skip-taskbar-hint", True)
config = pref.Preferences()
chooser.set_current_folder(config.get("choose_directory_dialog_path"))

View File

@ -71,8 +71,8 @@ class DelugeGTK:
self.window.connect("window-state-event", self.window_state_event)
self.window.connect("configure-event", self.window_configure_event)
self.window.set_title(common.PROGRAM_NAME)
self.window.set_icon(common.get_logo(32))
if not common.windows_check():
self.window.set_icon(common.get_logo(32))
# self.notebook is used by plugins
self.notebook = self.wtree.get_widget("torrent_info")
self.notebook.connect("switch-page", self.notebook_switch_page)