From 0a6af33002e8de216ecf8bd09cd4cd5a92ed8e69 Mon Sep 17 00:00:00 2001 From: Sai Vineet Date: Mon, 17 Mar 2014 13:51:17 +0000 Subject: Aesthetic changes --- diff --git a/develop-activity/develop_app.py b/develop-activity/develop_app.py index 2f65032..dba7555 100644 --- a/develop-activity/develop_app.py +++ b/develop-activity/develop_app.py @@ -82,6 +82,8 @@ class DevelopActivity(activity.Activity): self.editor = sourceview_editor.GtkSourceview2Editor() self.editor.connect('tab-changed', self.__editor_tab_changed_cb) self.editor.connect('changed', self.__editor_changed_cb) + # Show tabs after Welcome Page + self.editor.set_show_tabs(False) toolbarbox = ToolbarBox() activity_button = ActivityToolbarButton(self) @@ -204,7 +206,9 @@ class DevelopActivity(activity.Activity): self.treenotebook.add_page(_('Symbols Tree'), scrolled) hbox.pack1(sidebar, resize=True, shrink=False) - sidebar.show() + # Show sidebar after welcome page ends + # sidebar.show() + self.sidebar = sidebar logging.info('finished check') self.editor.show() @@ -266,9 +270,16 @@ class DevelopActivity(activity.Activity): self.editor.remove_page(0) self.first_open_activity(activity_dir) + # Show hidden stuff + self._show_hidden_ui() + def __welcome_show_alert_cb(self, welcome_page, message): self._show_alert(message) + def _show_hidden_ui(self): + self.sidebar.show() + self.editor.set_show_tabs(True) + def __run_actvity_cb(self, run_button): if self.save_unchanged: self.editor.save_all() @@ -461,6 +472,8 @@ class DevelopActivity(activity.Activity): finally: f.close() + self._show_hidden_ui() + self._set_dirty(False) def _set_dirty(self, dirty): diff --git a/develop-activity/widgets.py b/develop-activity/widgets.py index a84c015..ed4c342 100644 --- a/develop-activity/widgets.py +++ b/develop-activity/widgets.py @@ -93,7 +93,7 @@ class TabLabel(Gtk.HBox): self.emit('tab-close', self._child) -class WelcomePage(Gtk.VBox): +class WelcomePage(Gtk.EventBox): __gsignals__ = { 'open-activity': (GObject.SignalFlags.RUN_FIRST, @@ -105,7 +105,10 @@ class WelcomePage(Gtk.VBox): } def __init__(self): - Gtk.VBox.__init__(self) + Gtk.EventBox.__init__(self) + + vbox_outer = Gtk.VBox() + vbox = Gtk.VBox() edit_label = Gtk.Label( _('' @@ -115,7 +118,7 @@ class WelcomePage(Gtk.VBox): 'activity to have a backup.')) edit_label.set_use_markup(True) edit_label.set_line_wrap(True) - self.pack_start(edit_label, expand=False, fill=True, padding=10) + vbox.pack_start(edit_label, expand=False, fill=True, padding=10) hbox_edit = Gtk.HBox() hbox_edit.pack_start(Gtk.Label(_('Select the activity')), True, @@ -131,7 +134,7 @@ class WelcomePage(Gtk.VBox): padding=10) align = Gtk.Alignment.new(0.5, 0.5, 0, 0) align.add(hbox_edit) - self.pack_start(align, expand=False, fill=False, padding=10) + vbox.pack_start(align, expand=False, fill=False, padding=10) new_project_label = Gtk.Label( _('' @@ -140,7 +143,7 @@ class WelcomePage(Gtk.VBox): 'just select the type of project.')) new_project_label.set_use_markup(True) new_project_label.set_line_wrap(True) - self.pack_start(new_project_label, expand=False, fill=True, padding=10) + vbox.pack_start(new_project_label, expand=False, fill=True, padding=10) hbox_create = Gtk.HBox() hbox_create.pack_start(Gtk.Label(_('Select the type')), @@ -151,7 +154,7 @@ class WelcomePage(Gtk.VBox): padding=10) align = Gtk.Alignment.new(0.5, 0.5, 0, 0) align.add(hbox_create) - self.pack_start(align, expand=False, fill=False, padding=10) + vbox.pack_start(align, expand=False, fill=False, padding=10) hbox_name = Gtk.HBox() hbox_name.pack_start(Gtk.Label(_('Name the activity')), True, True, 0) @@ -166,8 +169,13 @@ class WelcomePage(Gtk.VBox): padding=10) align = Gtk.Alignment.new(0.5, 0.5, 0, 0) align.add(hbox_name) - self.pack_start(align, expand=False, fill=False, padding=10) + vbox.pack_start(align, expand=False, fill=False, padding=10) + + self.modify_bg(Gtk.StateType.NORMAL, + style.COLOR_WHITE.get_gdk_color()) + vbox_outer.pack_start(vbox, expand=True, fill=False, padding=0) + self.add(vbox_outer) self.show_all() def _load_activities_installed_combo(self, activities_combo): -- cgit v0.9.1