Re: [Sugar-devel] [PATCH sugar] Allow to build outside the source directory
On 27 June 2012 02:42, James Cameron wrote: >> diff --git a/autogen.sh b/autogen.sh >> index a71e202..bac5247 100755 >> --- a/autogen.sh >> +++ b/autogen.sh >> @@ -1,4 +1,13 @@ >> #!/bin/sh >> + >> +test -n "${srcdir}" || srcdir=`dirname "$0"` >> +test -n "${srcdir}" || srcdir="$(pwd)" > > I don't quite understand the intent here. The dirname should always > succeed. I'm not sure exactly why but this is present, in one form or another, in all the autogen.sh script I checked on git.gnome.org and freedesktop The most common form is really srcdir=`dirname $0` test -z "$srcdir" && srcdir=. Maybe be they are trying to account for systems that doesn't have dirname? Or maybe dirname on some systems returns empty instead of .? I don't have a strong feeling here but I'm tempted to go with the commonly used pattern. It won't hurt and if we find out later there was a good reason for it, it will be a bunch of scripts to update. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] Allow to build outside the source directory
On Wed, Jun 27, 2012 at 10:45:13AM +0200, Daniel Narvaez wrote: > On 27 June 2012 02:42, James Cameron wrote: > >> diff --git a/autogen.sh b/autogen.sh > >> index a71e202..bac5247 100755 > >> --- a/autogen.sh > >> +++ b/autogen.sh > >> @@ -1,4 +1,13 @@ > >> ?#!/bin/sh > >> + > >> +test -n "${srcdir}" || srcdir=`dirname "$0"` > >> +test -n "${srcdir}" || srcdir="$(pwd)" > > > > I don't quite understand the intent here. ?The dirname should always > > succeed. > > I'm not sure exactly why but this is present, in one form or another, > in all the autogen.sh script I checked on git.gnome.org and > freedesktop > > The most common form is really > > srcdir=`dirname $0` > test -z "$srcdir" && srcdir=. > > Maybe be they are trying to account for systems that doesn't have > dirname? Or maybe dirname on some systems returns empty instead of .? > > I don't have a strong feeling here but I'm tempted to go with the > commonly used pattern. It won't hurt and if we find out later there > was a good reason for it, it will be a bunch of scripts to update. Okay, I see your point. Each of your autogen.sh patches that do this therefore: Reviewed-by: James Cameron -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [sugar 0.96, NM 0.9 PATCH v2] sl#3727: Return cached secrets, present in 'settings' themselves.
Changes of version-2 over version-1 :: == * Adding comparative analysis of the behaviour netween Gnome-F14, Sugar-F14, Gnome-F17, Sugar-F17. * Note that there is no change of code. = For providing the explanation, let's do a comparative analysis of the behaviour netween Gnome-F14, Sugar-F14, Gnome-F17, Sugar-F17. Note that the bahaviour (especially on Sugar-F17) is WITHOUT applying this patch. == S.No.|| Environment ||Action || Gnome-F14 || Sugar-F14 || Gnome-F17 || Sugar-F17 = || || || || || || 1. || No connection attempt|| CORRECT credentials are ||Connection is || Connection is || Connection is || Connection is || has been made. Wifi AP || entered on first popup. || successful.|| successful. || successful. ||successfull. || is within range. || || || || || || || || || || || = || || || || || || 2. || No connection attempt|| INCORRECT credentials are ||Connection is || Connection is || Connection is || Connection is || has been made. Wifi AP || entered on first popup. || unsuccessful. || unsuccessful. || unsuccessful. || unsuccessful. || is within range. || || Popup re-appears, || Popup re-appears, || Popup DOES NOT re-|| Popup DOES NOT re- || || || expecting secrets.|| expecting secrets.|| appear; NM keeps || appear; NM keeps || || || || || trying with the || trying with the || || || || ||(INCORRECT)||(INCORRECT) || || || || || secrets. || secrets. || || || || || || = || || || || || || 3. || No connection attempt|| CORRECT credentials are ||Connection is || Connection is || Connection is || Connection is || has been made. Wifi AP || entered on first popup. || unsuccessful. || unsuccessful. || unsuccessful. || unsuccessful. || is NOT within range. || || Popup re-appears, || Popup re-appears, || Popup re-appears, || Popup re-appears, || || || expecting secrets.|| expecting secrets.|| expecting secrets.|| expecting secrets. || || || || || || == || || || || || || 4. || No connection attempt|| INCORRECT credentials are ||Connection is || Connection is || Connection is || Connection is || has been made. Wifi AP || entered on first popup. || unsuccessful. || unsuccessful. || unsuccessful. || unsuccessful. || is NOT within range. || || Popup re-appears, || Popup re-appears, || Popup re-appears, || Popup re-appears, || || || expecting secrets.|| expecting secrets.|| expecting se
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Fixing deprecations: Using Gtk.Orientation
Daniel, thanks for the patch. It is good to add some more details about the requested change in the description. [1] states for example: "GtkHBox has been deprecated. You can use GtkBox instead, which is a very quick and easy change. If you have derived your own classes from GtkHBox, you can simply change the inheritance to derive directly from GtkBox. No further changes are needed, since the default value of the "orientation" property is GTK_ORIENTATION_HORIZONTAL. If you want your code to be future-proof, the recommendation is to switch to GtkGrid, since GtkBox is going to be deprecated in favor of the more flexible grid widget eventually. For more information about migrating to GtkGrid, see Migrating from other containers to GtkGrid". So the first question that arises is: should we switch directly to GtkGrid [2]? Best would be to do a simple test program and compare the different containers. If GtkGrid can be used in the same way and it is the intended way forward we should switch directly to that. The migrating guide is interesting as well [3]. Regards, Simon [1] http://developer.gnome.org/gtk3/3.4/GtkHBox.html [2] http://developer.gnome.org/gtk3/3.4/GtkGrid.html [3] http://developer.gnome.org/gtk3/3.4/gtk-migrating-GtkGrid.html On 06/27/2012 04:56 AM, Daniel Francis wrote: --- src/sugar3/activity/widgets.py |3 ++- src/sugar3/graphics/alert.py|9 ++--- src/sugar3/graphics/notebook.py |6 -- src/sugar3/graphics/palette.py | 27 +++ src/sugar3/graphics/panel.py|3 ++- src/sugar3/graphics/radiopalette.py |3 ++- src/sugar3/graphics/toolbarbox.py |3 ++- src/sugar3/graphics/toolbox.py |6 -- src/sugar3/graphics/toolcombobox.py |3 ++- src/sugar3/graphics/tray.py |6 -- src/sugar3/graphics/window.py |6 -- 11 files changed, 51 insertions(+), 24 deletions(-) diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py index c4015ce..ffb3503 100644 --- a/src/sugar3/activity/widgets.py +++ b/src/sugar3/activity/widgets.py @@ -226,7 +226,8 @@ class DescriptionItem(Gtk.ToolItem): description_button.set_tooltip(_('Description')) self._palette = description_button.get_palette() -description_box = Gtk.HBox() +description_box = Gtk.Box() +description_box.set_orientation(Gtk.Orientation.HORIZONTAL) sw = Gtk.ScrolledWindow() sw.set_size_request(int(Gdk.Screen.width() / 2), 2 * style.GRID_CELL_SIZE) diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py index 16392cd..358fea4 100644 --- a/src/sugar3/graphics/alert.py +++ b/src/sugar3/graphics/alert.py @@ -97,11 +97,13 @@ class Alert(Gtk.EventBox): self._icon = None self._buttons = {} -self._hbox = Gtk.HBox() +self._hbox = Gtk.Box() +self._hbox.set_orientation(Gtk.Orientation.HORIZONTAL) self._hbox.set_border_width(style.DEFAULT_SPACING) self._hbox.set_spacing(style.DEFAULT_SPACING) -self._msg_box = Gtk.VBox() +self._msg_box = Gtk.Box() +self._msg_box.set_orientation(Gtk.Orientation.VERTICAL) self._title_label = Gtk.Label() self._title_label.set_alignment(0, 0.5) self._msg_box.pack_start(self._title_label, False, False, 0) @@ -111,7 +113,8 @@ class Alert(Gtk.EventBox): self._msg_box.pack_start(self._msg_label, False, False, 0) self._hbox.pack_start(self._msg_box, False, False, 0) -self._buttons_box = Gtk.HButtonBox() +self._buttons_box = Gtk.ButtonBox() +self._buttons_box.set_orientation(Gtk.Orientation.HORIZONTAL) self._buttons_box.set_layout(Gtk.ButtonBoxStyle.END) self._buttons_box.set_spacing(style.DEFAULT_SPACING) self._hbox.pack_start(self._buttons_box, True, True, 0) diff --git a/src/sugar3/graphics/notebook.py b/src/sugar3/graphics/notebook.py index e14bf0e..0f3e858 100644 --- a/src/sugar3/graphics/notebook.py +++ b/src/sugar3/graphics/notebook.py @@ -74,7 +74,8 @@ class Notebook(Gtk.Notebook): raise AssertionError def _add_icon_to_button(self, button): -icon_box = Gtk.HBox() +icon_box = Gtk.Box() +icon_box.set_orientation(Gtk.Orientation.HORIZONTAL) image = Gtk.Image() image.set_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU) Gtk.Button.set_relief(button, Gtk.ReliefStyle.NONE) @@ -91,7 +92,8 @@ class Notebook(Gtk.Notebook): def _create_custom_tab(self, text, child): event_box = Gtk.EventBox() -tab_box = Gtk.HBox(False, 2) +tab_box = Gtk.Box(False, 2) +tab_box.set_orientation(Gtk.Orientation.HORIZONTAL) tab_label = Gtk.Label(label=text) tab_button = Gtk.Button() diff --git a/src/sugar3/graphics/palette.py b/src/sugar3/graphics/palette.
Re: [Sugar-devel] [sugar 0.96, NM 0.9 PATCH v2] sl#3727: Return cached secrets, present in 'settings' themselves.
Hi all. Sorry for the garbled v2 patch (in this email thread). Please see the (good-info-view) patch at http://patchwork.sugarlabs.org/patch/1570/ @ Jerry, Please correct me if my observations are different from yours (as described by you in your last email). @Samul, Daniel, Peter : I have put in the comparative analysis between Gnome-F14, Sugar-F14, Gnome-17 and Fedora-F17 in the patch-description. Gist :: a) In Gnome-F17 and Sugar-F17, NM DOES NOT re-prompt (via the popup dialog), if incorrect credentials are provided. So, WITH or WITHOUT this patch, the client will get blacklisted/unauthorised/whatever if she enters the wrong credentials. b) So, what this patch does is to not re-prompt the user again and again (for the correct/unknowingly-incorrect) credentials, whenever the wifi goes out of range. In fact, this patch would solve this seemingly annoying behaviour in Sugar; and thus makes Sugar one-up on Gnome :D c) So, now comes the question of how to enter new credentials. In this respect, I tend to agree with Sascha and Jerry, to have the settings wiped out on a singular basis, via the patch http://patchwork.sugarlabs.org/patch/846/ Thanks and Regards, Ajay On Wed, Jun 27, 2012 at 2:30 PM, Ajay Garg wrote: > > Changes of version-2 over version-1 :: > == > > * Adding comparative analysis of the behaviour > netween Gnome-F14, Sugar-F14, Gnome-F17, Sugar-F17. > > * Note that there is no change of code. > > > > > > = > > > > For providing the explanation, let's do a comparative analysis of the > behaviour > netween Gnome-F14, Sugar-F14, Gnome-F17, Sugar-F17. > > Note that the bahaviour (especially on Sugar-F17) is WITHOUT applying this > patch. > > > > == > S.No.|| Environment ||Action || > Gnome-F14 || Sugar-F14 || Gnome-F17 || Sugar-F17 > > = > || || || > || || || > 1. || No connection attempt|| CORRECT credentials are || > Connection is || Connection is || Connection is || Connection > is > || has been made. Wifi AP || entered on first popup. || > successful.|| successful. || successful. ||successfull. > || is within range. || || > || || || > || || || > || || || > > = > || || || > || || || > 2. || No connection attempt|| INCORRECT credentials are || > Connection is || Connection is || Connection is || Connection > is > || has been made. Wifi AP || entered on first popup. || > unsuccessful. || unsuccessful. || unsuccessful. || > unsuccessful. > || is within range. || || Popup > re-appears, || Popup re-appears, || Popup DOES NOT re-|| Popup DOES NOT re- > || || || > expecting secrets.|| expecting secrets.|| appear; NM keeps || appear; NM > keeps > || || || > || || trying with the || trying with the > || || || > || ||(INCORRECT)||(INCORRECT) > || || || > || || secrets. || secrets. > || || || > || || || > > = > || || || > || || || > 3. || No connection attempt|| CORRECT credentials are || > Connection is || Connection is || Connection is || Connection > is > || has been made. Wifi AP || entered on first popup. || > unsuccessful. || unsuccessful. || unsuccessful. || > unsuccessful. > || is NOT within rang
[Sugar-devel] Shell Port: RandomLayout (FreeFormLayout)
Hi, while porting the Home View I am dealing as well with the RandomLayout. When it was introduced the idea was to give learners a chance to personalize their home view and group activities together if desired. This was basically mimicking the desktop metaphor. I agree that there is value in letting users customize their home view, in grouping activities for example, like grouping in subjects (e.g. math, language). I question a bit that the RandomLayout is a good tool for that. There is no grid where the icons get snapped to, no visual indication of groups only by positioning. And the current implementation is mainly a proof of concept which is not very precise in placing icons close to each other. So my questions are now: - is it used in deployments? If, in which ways do kids use it? What do they like about it and what do they try to achieve with it? - do we want to keep supporting the FreeFormLayout? Or work on a better activity managing layout? - if we remove it, do we still want to port it? I am close for the no-hippo part, but it is another complex bit, that we need to invest and if we don't want to go forward with it no need to invest there. Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Shell Port: RandomLayout (FreeFormLayout)
On Wed, Jun 27, 2012 at 6:41 AM, Simon Schampijer wrote: > Hi, > > while porting the Home View I am dealing as well with the RandomLayout. When > it was introduced the idea was to give learners a chance to personalize > their home view and group activities together if desired. This was basically > mimicking the desktop metaphor. > > I agree that there is value in letting users customize their home view, in > grouping activities for example, like grouping in subjects (e.g. math, > language). I question a bit that the RandomLayout is a good tool for that. > There is no grid where the icons get snapped to, no visual indication of > groups only by positioning. And the current implementation is mainly a proof > of concept which is not very precise in placing icons close to each other. > > So my questions are now: > > - is it used in deployments? If, in which ways do kids use it? What do they > like about it and what do they try to achieve with it? I have seen it used in deployments, but cannot say as to the extent to which it is used. > > - do we want to keep supporting the FreeFormLayout? Or work on a better > activity managing layout? Might be nice to add snap to grid? Or maybe something as simple as allowing reordering of the spiral (swapping positions)? > > - if we remove it, do we still want to port it? I am close for the no-hippo > part, but it is another complex bit, that we need to invest and if we don't > want to go forward with it no need to invest there. I am not sure I understand what you are asking. Remove it and port it? Seems a contradiction. FWIW, as I reported earlier in the year when I visited the deployment in Miami, many kids were using the GNOME desktop, not because they were using GNOME apps, but because they wanted to set the background image on their computers. IMHO, adding a set-background feature would be of much greater interest to deployments than alt icon layout schema. -walter > > Regards, > Simon > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [ASLO] Release Jam Game Boy Advance-2
Activity Homepage: http://activities.sugarlabs.org/addon/4381 Sugar Platform: 0.82 - 0.96 Download Now: http://activities.sugarlabs.org/downloads/file/28140/jam_game_boy_advance-2.xo Release notes: Sugar Labs Activities http://activities.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Get Books] Revert the thumbnail fill color to COLOR_PANEL_GREY SL #3723
Thanks, pushed Gonzalo On Mon, Jun 25, 2012 at 11:12 AM, Manuel Quiñones wrote: > This should be fixed in the theme. > > Signed-off-by: Manuel Quiñones > --- > GetIABooksActivity.py |7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/GetIABooksActivity.py b/GetIABooksActivity.py > index b340798..ed91546 100644 > --- a/GetIABooksActivity.py > +++ b/GetIABooksActivity.py > @@ -732,12 +732,7 @@ class GetIABooksActivity(activity.Activity): > pixbuf.get_has_alpha(), pixbuf.get_bits_per_sample(), > image_width, image_height) > > -# FIXME: I used this darker color instead of > -# style.COLOR_PANEL_GREY because there is a big difference on > -# the image. We should find the way to use the same color on > -# the .png loaded than in the rest of the square and remove > -# the 1px border > -pixbuf2.fill(style.COLOR_BUTTON_GREY.get_int()) > +pixbuf2.fill(style.COLOR_PANEL_GREY.get_int()) > > margin_x = int((image_width - (width * scale)) / 2) > margin_y = int((image_height - (height * scale)) / 2) > -- > 1.7.10.2 > > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Fixing deprecations: Using Gtk.Orientation
> [1] states for example: "GtkHBox has been deprecated. You can use GtkBox > instead, which is a very quick and easy change. If you have derived your own > classes from GtkHBox, you can simply change the inheritance to derive > directly from GtkBox. No further changes are needed, since the default value > of the "orientation" property is GTK_ORIENTATION_HORIZONTAL. If you want > your code to be future-proof, the recommendation is to switch to GtkGrid, > since GtkBox is going to be deprecated in favor of the more flexible grid > widget eventually. For more information about migrating to GtkGrid, see > Migrating from other containers to GtkGrid". Why not? Lets migrate all our gtk3 components to GtkGrid! > So the first question that arises is: should we switch directly to GtkGrid > [2]? Best would be to do a simple test program and compare the different > containers. If GtkGrid can be used in the same way and it is the intended > way forward we should switch directly to that. The migrating guide is > interesting as well [3]. Your articles say the ways to do it with GtkGrid are very different than with GtkBox, but it's similar than the GtkTable. I can make another patch with the migration from GtkBox and GtkTable to GtkGrid and add the information to the Wiki [1], but this patch hasn't got only corrections of boxes. You decide if I have to make from this patch a version 2, or make a new patch only with boxes and tables corrections. Cheers. [1] http://wiki.sugarlabs.org/go/Features/GTK3/Porting > Regards, > Simon > > [1] http://developer.gnome.org/gtk3/3.4/GtkHBox.html > [2] http://developer.gnome.org/gtk3/3.4/GtkGrid.html > [3] http://developer.gnome.org/gtk3/3.4/gtk-migrating-GtkGrid.html > > > > On 06/27/2012 04:56 AM, Daniel Francis wrote: >> >> --- >> src/sugar3/activity/widgets.py | 3 ++- >> src/sugar3/graphics/alert.py | 9 ++--- >> src/sugar3/graphics/notebook.py | 6 -- >> src/sugar3/graphics/palette.py | 27 +++ >> src/sugar3/graphics/panel.py | 3 ++- >> src/sugar3/graphics/radiopalette.py | 3 ++- >> src/sugar3/graphics/toolbarbox.py | 3 ++- >> src/sugar3/graphics/toolbox.py | 6 -- >> src/sugar3/graphics/toolcombobox.py | 3 ++- >> src/sugar3/graphics/tray.py | 6 -- >> src/sugar3/graphics/window.py | 6 -- >> 11 files changed, 51 insertions(+), 24 deletions(-) >> >> diff --git a/src/sugar3/activity/widgets.py >> b/src/sugar3/activity/widgets.py >> index c4015ce..ffb3503 100644 >> --- a/src/sugar3/activity/widgets.py >> +++ b/src/sugar3/activity/widgets.py >> @@ -226,7 +226,8 @@ class DescriptionItem(Gtk.ToolItem): >> description_button.set_tooltip(_('Description')) >> self._palette = description_button.get_palette() >> >> - description_box = Gtk.HBox() >> + description_box = Gtk.Box() >> + description_box.set_orientation(Gtk.Orientation.HORIZONTAL) >> sw = Gtk.ScrolledWindow() >> sw.set_size_request(int(Gdk.Screen.width() / 2), >> 2 * style.GRID_CELL_SIZE) >> diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py >> index 16392cd..358fea4 100644 >> --- a/src/sugar3/graphics/alert.py >> +++ b/src/sugar3/graphics/alert.py >> @@ -97,11 +97,13 @@ class Alert(Gtk.EventBox): >> self._icon = None >> self._buttons = {} >> >> - self._hbox = Gtk.HBox() >> + self._hbox = Gtk.Box() >> + self._hbox.set_orientation(Gtk.Orientation.HORIZONTAL) >> self._hbox.set_border_width(style.DEFAULT_SPACING) >> self._hbox.set_spacing(style.DEFAULT_SPACING) >> >> - self._msg_box = Gtk.VBox() >> + self._msg_box = Gtk.Box() >> + self._msg_box.set_orientation(Gtk.Orientation.VERTICAL) >> self._title_label = Gtk.Label() >> self._title_label.set_alignment(0, 0.5) >> self._msg_box.pack_start(self._title_label, False, False, 0) >> @@ -111,7 +113,8 @@ class Alert(Gtk.EventBox): >> self._msg_box.pack_start(self._msg_label, False, False, 0) >> self._hbox.pack_start(self._msg_box, False, False, 0) >> >> - self._buttons_box = Gtk.HButtonBox() >> + self._buttons_box = Gtk.ButtonBox() >> + self._buttons_box.set_orientation(Gtk.Orientation.HORIZONTAL) >> self._buttons_box.set_layout(Gtk.ButtonBoxStyle.END) >> self._buttons_box.set_spacing(style.DEFAULT_SPACING) >> self._hbox.pack_start(self._buttons_box, True, True, 0) >> diff --git a/src/sugar3/graphics/notebook.py >> b/src/sugar3/graphics/notebook.py >> index e14bf0e..0f3e858 100644 >> --- a/src/sugar3/graphics/notebook.py >> +++ b/src/sugar3/graphics/notebook.py >> @@ -74,7 +74,8 @@ class Notebook(Gtk.Notebook): >> raise AssertionError >> >> def _add_icon_to_button(self, button): >> - icon_box = Gtk.HBox() >> + icon_box = Gtk.Box() >> + icon_box
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Fixing deprecations: Using Gtk.Orientation
> > > Why not? Lets migrate all our gtk3 components to GtkGrid! > > We should check if the move to GtkGrid is really "free of charge". There are a lot to change right now, and if changing the boxes break (or change visuals) in subtle ways, will be a headache. Then, should be good test it, before doing a massive search and replace. Gonzalo > > So the first question that arises is: should we switch directly to > GtkGrid > > [2]? Best would be to do a simple test program and compare the different > > containers. If GtkGrid can be used in the same way and it is the intended > > way forward we should switch directly to that. The migrating guide is > > interesting as well [3]. > Your articles say the ways to do it with GtkGrid are very different > than with GtkBox, but it's similar than the GtkTable. > > I can make another patch with the migration from GtkBox and GtkTable > to GtkGrid and add the information to the Wiki [1], but this patch > hasn't got only corrections of boxes. You decide if I have to make > from this patch a version 2, or make a new patch only with boxes and > tables corrections. > > Cheers. > > [1] http://wiki.sugarlabs.org/go/Features/GTK3/Porting > > > Regards, > > Simon > > > > [1] http://developer.gnome.org/gtk3/3.4/GtkHBox.html > > [2] http://developer.gnome.org/gtk3/3.4/GtkGrid.html > > [3] http://developer.gnome.org/gtk3/3.4/gtk-migrating-GtkGrid.html > > > > > > > > On 06/27/2012 04:56 AM, Daniel Francis wrote: > >> > >> --- > >> src/sugar3/activity/widgets.py |3 ++- > >> src/sugar3/graphics/alert.py|9 ++--- > >> src/sugar3/graphics/notebook.py |6 -- > >> src/sugar3/graphics/palette.py | 27 +++ > >> src/sugar3/graphics/panel.py|3 ++- > >> src/sugar3/graphics/radiopalette.py |3 ++- > >> src/sugar3/graphics/toolbarbox.py |3 ++- > >> src/sugar3/graphics/toolbox.py |6 -- > >> src/sugar3/graphics/toolcombobox.py |3 ++- > >> src/sugar3/graphics/tray.py |6 -- > >> src/sugar3/graphics/window.py |6 -- > >> 11 files changed, 51 insertions(+), 24 deletions(-) > >> > >> diff --git a/src/sugar3/activity/widgets.py > >> b/src/sugar3/activity/widgets.py > >> index c4015ce..ffb3503 100644 > >> --- a/src/sugar3/activity/widgets.py > >> +++ b/src/sugar3/activity/widgets.py > >> @@ -226,7 +226,8 @@ class DescriptionItem(Gtk.ToolItem): > >> description_button.set_tooltip(_('Description')) > >> self._palette = description_button.get_palette() > >> > >> -description_box = Gtk.HBox() > >> +description_box = Gtk.Box() > >> +description_box.set_orientation(Gtk.Orientation.HORIZONTAL) > >> sw = Gtk.ScrolledWindow() > >> sw.set_size_request(int(Gdk.Screen.width() / 2), > >> 2 * style.GRID_CELL_SIZE) > >> diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py > >> index 16392cd..358fea4 100644 > >> --- a/src/sugar3/graphics/alert.py > >> +++ b/src/sugar3/graphics/alert.py > >> @@ -97,11 +97,13 @@ class Alert(Gtk.EventBox): > >> self._icon = None > >> self._buttons = {} > >> > >> -self._hbox = Gtk.HBox() > >> +self._hbox = Gtk.Box() > >> +self._hbox.set_orientation(Gtk.Orientation.HORIZONTAL) > >> self._hbox.set_border_width(style.DEFAULT_SPACING) > >> self._hbox.set_spacing(style.DEFAULT_SPACING) > >> > >> -self._msg_box = Gtk.VBox() > >> +self._msg_box = Gtk.Box() > >> +self._msg_box.set_orientation(Gtk.Orientation.VERTICAL) > >> self._title_label = Gtk.Label() > >> self._title_label.set_alignment(0, 0.5) > >> self._msg_box.pack_start(self._title_label, False, False, 0) > >> @@ -111,7 +113,8 @@ class Alert(Gtk.EventBox): > >> self._msg_box.pack_start(self._msg_label, False, False, 0) > >> self._hbox.pack_start(self._msg_box, False, False, 0) > >> > >> -self._buttons_box = Gtk.HButtonBox() > >> +self._buttons_box = Gtk.ButtonBox() > >> +self._buttons_box.set_orientation(Gtk.Orientation.HORIZONTAL) > >> self._buttons_box.set_layout(Gtk.ButtonBoxStyle.END) > >> self._buttons_box.set_spacing(style.DEFAULT_SPACING) > >> self._hbox.pack_start(self._buttons_box, True, True, 0) > >> diff --git a/src/sugar3/graphics/notebook.py > >> b/src/sugar3/graphics/notebook.py > >> index e14bf0e..0f3e858 100644 > >> --- a/src/sugar3/graphics/notebook.py > >> +++ b/src/sugar3/graphics/notebook.py > >> @@ -74,7 +74,8 @@ class Notebook(Gtk.Notebook): > >> raise AssertionError > >> > >> def _add_icon_to_button(self, button): > >> -icon_box = Gtk.HBox() > >> +icon_box = Gtk.Box() > >> +icon_box.set_orientation(Gtk.Orientation.HORIZONTAL) > >> image = Gtk.Image() > >> image.set_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU) > >> Gtk.B
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Fixing deprecations: Using Gtk.Orientation
2012/6/27 Gonzalo Odiard : >> >> Why not? Lets migrate all our gtk3 components to GtkGrid! >> > > We should check if the move to GtkGrid is really "free of charge". > There are a lot to change right now, and if changing the boxes > break (or change visuals) in subtle ways, will be a headache. If we want to get the same visual appearance than with the Gtk Boxes I suggest make a Box class which inherits from GtkGrid in the Sugar API. Because the way to get the same results can be very long with grids. > Then, should be good test it, before doing a massive search and replace. > > Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Jukebox] Design review SL #3714
Reviewed-by: Gonzalo Odiard On Tue, Jun 26, 2012 at 4:11 PM, Manuel Kaufmann wrote: > - Switched "Fullscreen" and "Show playlist" buttons in View Toolbar > - Added tooltip for "Add Track" button > - Changed the icon for "Add Track" button to match the style with > the "Remove Track" > - Use just "Remove Track" as tooltip on "Remove Track" button > - Changed the name of the icon for "Remove Track" > - Added a separator between the "Previous" and "Remove Track" buttons > - Removed "Volume" slider > > Signed-off-by: Manuel Kaufmann > --- > ControlToolbar.py | 34 +++--- > 1 file changed, 15 insertions(+), 19 deletions(-) > > diff --git a/ControlToolbar.py b/ControlToolbar.py > index a4f9225..4bb4935 100644 > --- a/ControlToolbar.py > +++ b/ControlToolbar.py > @@ -39,12 +39,6 @@ class ViewToolbar(gtk.Toolbar): > def __init__(self): > gtk.Toolbar.__init__(self) > > -self._fullscreen = ToolButton('view-fullscreen') > -self._fullscreen.set_tooltip(_('Fullscreen')) > -self._fullscreen.connect('clicked', self._fullscreen_cb) > -self.insert(self._fullscreen, -1) > -self._fullscreen.show() > - > self._show_playlist = ToggleToolButton('view-list') > self._show_playlist.set_active(True) > self._show_playlist.set_tooltip(_('Show Playlist')) > @@ -52,6 +46,12 @@ class ViewToolbar(gtk.Toolbar): > self.insert(self._show_playlist, -1) > self._show_playlist.show() > > +self._fullscreen = ToolButton('view-fullscreen') > +self._fullscreen.set_tooltip(_('Fullscreen')) > +self._fullscreen.connect('clicked', self._fullscreen_cb) > +self.insert(self._fullscreen, -1) > +self._fullscreen.show() > + > def _fullscreen_cb(self, button): > self.emit('go-fullscreen') > > @@ -68,18 +68,23 @@ class Control(gobject.GObject): > self.toolbar = toolbar > self.jukebox = jukebox > > -self.open_button = ToolButton('sound') > +self.open_button = ToolButton('list-add') > +self.open_button.set_tooltip(_('Add track')) > self.open_button.show() > self.open_button.connect('clicked', jukebox.open_button_clicked_cb) > self.toolbar.insert(self.open_button, -1) > > -erase_playlist_entry_btn = ToolButton(icon_name='edit-delete') > -erase_playlist_entry_btn.set_tooltip(_('Remove selected track' \ > - ' from the playlist')) > +erase_playlist_entry_btn = ToolButton(icon_name='list-remove') > +erase_playlist_entry_btn.set_tooltip(_('Remove track')) > erase_playlist_entry_btn.connect('clicked', > jukebox._erase_playlist_entry_clicked_cb) > self.toolbar.insert(erase_playlist_entry_btn, -1) > > +spacer = gtk.SeparatorToolItem() > +spacer.props.draw = False > +self.toolbar.insert(spacer, -1) > +spacer.show() > + > self.prev_button = ToolButton('player_rew') > self.prev_button.set_tooltip(_('Previous')) > self.prev_button.show() > @@ -126,15 +131,6 @@ class Control(gobject.GObject): > self.toolbar.insert(spacer, -1) > spacer.show() > > -self.audioscale = gtk.VolumeButton() > -self.audioscale.connect('value-changed', > jukebox.volume_changed_cb) > -self.audioscale.set_value(1) > - > -self.audio_scale_item = gtk.ToolItem() > -self.audio_scale_item.set_expand(False) > -self.audio_scale_item.add(self.audioscale) > -self.toolbar.insert(self.audio_scale_item, -1) > - > spacer = gtk.SeparatorToolItem() > spacer.props.draw = False > self.toolbar.insert(spacer, -1) > -- > 1.7.10.2 > > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH Jukebox] Current and total time SL #3714
Thanks Reviewed-by: Gonzalo Odiard On Tue, Jun 26, 2012 at 4:11 PM, Manuel Kaufmann wrote: > Added the current and total time of the actual stream in the toolbar > and removed the separators to make them fit. > > Signed-off-by: Manuel Kaufmann > --- > ControlToolbar.py | 20 +++- > jukeboxactivity.py | 17 - > 2 files changed, 23 insertions(+), 14 deletions(-) > > diff --git a/ControlToolbar.py b/ControlToolbar.py > index 4bb4935..d3cdfed 100644 > --- a/ControlToolbar.py > +++ b/ControlToolbar.py > @@ -112,6 +112,12 @@ class Control(gobject.GObject): > self.next_button.connect('clicked', self.next_button_clicked_cb) > self.toolbar.insert(self.next_button, -1) > > +current_time = gtk.ToolItem() > +self.current_time_label = gtk.Label('') > +current_time.add(self.current_time_label) > +current_time.show() > +toolbar.insert(current_time, -1) > + > self.adjustment = gtk.Adjustment(0.0, 0.00, 100.0, 0.1, 1.0, 1.0) > self.hscale = gtk.HScale(self.adjustment) > self.hscale.set_draw_value(False) > @@ -126,15 +132,11 @@ class Control(gobject.GObject): > self.scale_item.add(self.hscale) > self.toolbar.insert(self.scale_item, -1) > > -spacer = gtk.SeparatorToolItem() > -spacer.props.draw = False > -self.toolbar.insert(spacer, -1) > -spacer.show() > - > -spacer = gtk.SeparatorToolItem() > -spacer.props.draw = False > -self.toolbar.insert(spacer, -1) > -spacer.show() > +total_time = gtk.ToolItem() > +self.total_time_label = gtk.Label('') > +total_time.add(self.total_time_label) > +total_time.show() > +toolbar.insert(total_time, -1) > > def prev_button_clicked_cb(self, widget): > self.jukebox.songchange('prev') > diff --git a/jukeboxactivity.py b/jukeboxactivity.py > index a16fbd1..952a998 100644 > --- a/jukeboxactivity.py > +++ b/jukeboxactivity.py > @@ -124,11 +124,6 @@ class JukeboxActivity(activity.Activity): > > self.control = Control(toolbar_box.toolbar, self) > > -separator = gtk.SeparatorToolItem() > -separator.props.draw = False > -separator.set_expand(True) > -toolbar_box.toolbar.insert(separator, -1) > - > toolbar_box.toolbar.insert(StopButton(self), -1) > > self.set_toolbar_box(toolbar_box) > @@ -597,6 +592,18 @@ class JukeboxActivity(activity.Activity): > value = self.p_position * 100.0 / self.p_duration > self.control.adjustment.set_value(value) > > +# Update the current time > +seconds = self.p_position * 10 ** -9 > +time = '%2d:%02d' % (int(seconds / 60), int(seconds % 60)) > +self.control.current_time_label.set_text(time) > + > +# FIXME: this should be updated just once when the file starts > +# the first time > +if self.p_duration != gst.CLOCK_TIME_NONE: > +seconds = self.p_duration * 10 ** -9 > +time = '%2d:%02d' % (int(seconds / 60), int(seconds % 60)) > +self.control.total_time_label.set_text(time) > + > return True > > def _erase_playlist_entry_clicked_cb(self, widget): > -- > 1.7.10.2 > > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Gtk.DrawingArea's draw signal
Maybe this (ported to gtk3) can be useful for you http://git.sugarlabs.org/simplepiano Gonzalo On Wed, Jun 27, 2012 at 12:07 PM, Manuel Kaufmann wrote: > Hello, > > I'm porting Implode to Gtk3 and after doing some changes I found that > I can't draw the main widget: GridWidget (inherits from > Gtk.DrawingArea). My "work in progress" is hosted here [1]. > > I'm not sure to understand how the "expose-event" (from gtk 2) works > and how it must be replaced by "draw". Besides, there are more signals > overrided that I don't know how to migrate. > > There are two screenshot attached on this email that show the main and > the help window, but both of them are not drawing the main widget. > > Any clue / comment / something to say that can help me? > > Thanks, > > [1] http://bugs.sugarlabs.org/ticket/3715 > > -- > Kaufmann Manuel > Blog: http://humitos.wordpress.com/ > Porfolio: http://fotos.mkaufmann.com.ar/ > PyAr: http://www.python.com.ar/ > > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Gtk.DrawingArea's draw signal
On Wed, Jun 27, 2012 at 12:13 PM, Gonzalo Odiard wrote: > Maybe this (ported to gtk3) can be useful for you I was taking a look at that. The problem that I think that I'm having is that the "draw" signal is not emitted by Gtk and I don't know why. If I put a logging.debug in the method "do_draw_event" it is not printed in the screen :( -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Gtk.DrawingArea's draw signal
2012/6/27 Manuel Kaufmann : > On Wed, Jun 27, 2012 at 12:13 PM, Gonzalo Odiard wrote: >> Maybe this (ported to gtk3) can be useful for you > > I was taking a look at that. The problem that I think that I'm having > is that the "draw" signal is not emitted by Gtk and I don't know why. > If I put a logging.debug in the method "do_draw_event" it is not > printed in the screen :( What if you force sending the signal? call queue_draw() http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-queue-draw -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Gtk.DrawingArea's draw signal
On Wed, Jun 27, 2012 at 1:40 PM, Manuel Quiñones wrote: > What if you force sending the signal? call queue_draw() > > http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-queue-draw Yes, I had already tried that but I couldn't. I'm not completely sure what I did :P , but I have Implode working under Gtk3 now :) This is the diff: http://bugs.sugarlabs.org/attachment/ticket/3715/First-Working-Version.diff Thanks all! (screenshot attached) -- Kaufmann Manuel Blog: http://humitos.wordpress.com/ Porfolio: http://fotos.mkaufmann.com.ar/ PyAr: http://www.python.com.ar/ <>___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-toolkit-gtk3] Fixing deprecations: Using Gtk.Orientation
+1 for the Daniel's idea. El 27/06/2012 09:52, "S. Daniel Francis" escribió: > 2012/6/27 Gonzalo Odiard : > >> > >> Why not? Lets migrate all our gtk3 components to GtkGrid! > >> > > > > We should check if the move to GtkGrid is really "free of charge". > > There are a lot to change right now, and if changing the boxes > > break (or change visuals) in subtle ways, will be a headache. > > If we want to get the same visual appearance than with the Gtk Boxes I > suggest make a Box class which inherits from GtkGrid in the Sugar API. > Because the way to get the same results can be very long with grids. > > > Then, should be good test it, before doing a massive search and replace. > > > > Gonzalo > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] schools.sl.o broken?
Looks like http://schools.sugarlabs.org/ is broken... Sameer -- Sameer Verma, Ph.D. Professor, Information Systems San Francisco State University http://verma.sfsu.edu/ http://commons.sfsu.edu/ http://olpcsf.org/ http://olpcjamaica.org.jm/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel