Mailinglist Archive: yast-commit (590 mails)

< Previous Next >
[yast-commit] r61651 - in /trunk/gtk: ChangeLog src/YGTable.cc src/pkg/ygtkpkgdetailview.cc src/pkg/ygtkpkghistorydialog.cc src/ygtktreeview.c
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Sun, 11 Apr 2010 11:37:36 -0000
  • Message-id: <E1O0vTs-0006g1-Rq@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Sun Apr 11 13:37:35 2010
New Revision: 61651

URL: http://svn.opensuse.org/viewcvs/yast?rev=61651&view=rev
Log:
* src/YGTable.cc: reverted Arabic treatment.

* src/YGTable.cc: fixed crash when right-clicking on
selection-box, multi-box and tree, due to a casting
problem.

* src/pkg/ygtkpkghistorydialog.cc: fixed crash:
reported by Atri Bhattacharya.

* src/pkg/ygtkpkgdetailview.cc: changed gray title bar
to cover the entire widget.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGTable.cc
trunk/gtk/src/pkg/ygtkpkgdetailview.cc
trunk/gtk/src/pkg/ygtkpkghistorydialog.cc
trunk/gtk/src/ygtktreeview.c

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=61651&r1=61650&r2=61651&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Apr 11 13:37:35 2010
@@ -1,3 +1,17 @@
+2010-04-11 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/YGTable.cc: reverted Arabic treatment.
+
+ * src/YGTable.cc: fixed crash when right-clicking on
+ selection-box, multi-box and tree, due to a casting
+ problem.
+
+ * src/pkg/ygtkpkghistorydialog.cc: fixed crash:
+ reported by Atri Bhattacharya.
+
+ * src/pkg/ygtkpkgdetailview.cc: changed gray title bar
+ to cover the entire widget.
+
2010-04-10 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/YGTable.cc: don't show context menu entries

Modified: trunk/gtk/src/YGTable.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGTable.cc?rev=61651&r1=61650&r2=61651&view=diff
==============================================================================
--- trunk/gtk/src/YGTable.cc (original)
+++ trunk/gtk/src/YGTable.cc Sun Apr 11 13:37:35 2010
@@ -80,7 +80,7 @@
}

gtk_tree_view_column_set_resizable (column, TRUE);
- ygtk_tree_view_append_column (YGTK_TREE_VIEW (getView()),
column);
+ gtk_tree_view_append_column (getView(), column);
}

void appendCheckColumn (string header, int bool_col)
@@ -93,7 +93,7 @@
G_CALLBACK (toggled_cb), this);

gtk_tree_view_column_set_resizable (column, TRUE);
- ygtk_tree_view_append_column (YGTK_TREE_VIEW (getView()),
column);
+ gtk_tree_view_append_column (getView(), column);
}

void appendEmptyColumn()
@@ -457,7 +457,7 @@
connect (getWidget(), "row-activated", G_CALLBACK
(activated_cb), (YGTableView *) this);
connect (getSelection(), "changed", G_CALLBACK
(selection_changed_cb), (YGTableView *) this);
#if YAST2_VERSION > 2018003
- connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), this);
+ connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), (YGTableView *) this);
#endif
}

@@ -493,7 +493,7 @@
// Let the user toggle, using space/enter or double click (not
an event).
connect (getWidget(), "row-activated", G_CALLBACK
(multi_activated_cb), this);
#if YAST2_VERSION > 2018003
- connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), this);
+ connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), (YGTableView *) this);
#endif
}

@@ -567,7 +567,7 @@
connect (getWidget(), "cursor-changed", G_CALLBACK
(row_selected_cb), this);
connect (getWidget(), "row-activated", G_CALLBACK
(activated_cb), (YGTableView *) this);
#if YAST2_VERSION > 2018003
- connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), this);
+ connect (getWidget(), "right-click", G_CALLBACK
(right_click_cb), (YGTableView *) this);
#endif
}


Modified: trunk/gtk/src/pkg/ygtkpkgdetailview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkgdetailview.cc?rev=61651&r1=61650&r2=61651&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkgdetailview.cc Sun Apr 11 13:37:35 2010
@@ -1109,6 +1109,11 @@
{
DetailWidget *widget;

+ GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+ widget = new DetailName();
+ m_widgets.push_back (widget);
+ gtk_box_pack_start (GTK_BOX (vbox), widget->getWidget(), FALSE,
TRUE, 0);
+
GtkWidget *side_vbox = gtk_vbox_new (FALSE, 0);
widget = new VersionExpander();
m_widgets.push_back (widget);
@@ -1120,9 +1125,6 @@
}

GtkWidget *main_vbox = gtk_vbox_new (FALSE, 0);
- widget = new DetailName();
- m_widgets.push_back (widget);
- gtk_box_pack_start (GTK_BOX (main_vbox), widget->getWidget(),
FALSE, TRUE, 0);
widget = new DetailDescription();
m_widgets.push_back (widget);
gtk_box_pack_start (GTK_BOX (main_vbox), widget->getWidget(),
FALSE, TRUE, 0);
@@ -1153,13 +1155,15 @@
GtkWidget *hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), side_vbox, FALSE, TRUE, 0);
- g_signal_connect (G_OBJECT (hbox), "expose-event",
+
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+ g_signal_connect (G_OBJECT (vbox), "expose-event",
G_CALLBACK (white_expose_cb), NULL);

m_scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW
(m_scroll), hbox);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW
(m_scroll), vbox);

gtk_widget_show_all (m_scroll);
g_signal_connect (G_OBJECT (m_scroll), "realize",

Modified: trunk/gtk/src/pkg/ygtkpkghistorydialog.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/ygtkpkghistorydialog.cc?rev=61651&r1=61650&r2=61651&view=diff
==============================================================================
--- trunk/gtk/src/pkg/ygtkpkghistorydialog.cc (original)
+++ trunk/gtk/src/pkg/ygtkpkghistorydialog.cc Sun Apr 11 13:37:35 2010
@@ -279,7 +279,9 @@
name = _item->name;
descrpt = _item->edition.version();
reqby = _item->reqby; autoreq = reqby.empty();
reqby = reqbyTreatment (reqby);
- installed.erase (installed.find (name));
+ std::map <std::string, int>::iterator it =
installed.find (name);
+ if (it != installed.end())
+ installed.erase (it);
break;
}
case zypp::HistoryActionID::REPO_ADD_e: {
@@ -579,8 +581,8 @@
title += " ("; title += FILENAME; title += ")";
GtkWidget *dialog = gtk_message_dialog_new (YGDialog::currentWindow(),
GtkDialogFlags (0), GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE,
title.c_str());
- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Save to File"), 2);
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_JUMP_TO, 1);
+ gtk_dialog_add_button (GTK_DIALOG (dialog), _("Save to File"), 2);
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), 1, FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);

Modified: trunk/gtk/src/ygtktreeview.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtktreeview.c?rev=61651&r1=61650&r2=61651&view=diff
==============================================================================
--- trunk/gtk/src/ygtktreeview.c (original)
+++ trunk/gtk/src/ygtktreeview.c Sun Apr 11 13:37:35 2010
@@ -119,6 +119,9 @@
{
GtkWidget *menu = gtk_menu_new();
GList *columns = gtk_tree_view_get_columns (GTK_TREE_VIEW (view));
+ // see ygtk_tree_view_append_column(): we re-order arabic column
insertion
+ gboolean reverse = gtk_widget_get_default_direction() ==
GTK_TEXT_DIR_RTL &&
+ gtk_widget_get_direction (GTK_WIDGET (view)) !=
GTK_TEXT_DIR_RTL;
int n;
GList *i;
for (n = 0, i = columns; i; i = i->next, n++) {
@@ -133,14 +136,14 @@
g_signal_connect (G_OBJECT (item), "toggled",
G_CALLBACK (show_column_cb), view);

- // see ygtk_tree_view_append_column(): we re-order
arabic column insertion
- if (gtk_widget_get_default_direction() ==
GTK_TEXT_DIR_RTL)
+ if (reverse)
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu),
item);
else
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
item);

// if the user were to remove all columns, the
right-click would no longer work
- gtk_widget_set_sensitive (item, n != 0);
+ if (n == 0 && !reverse)
+ gtk_widget_set_sensitive (item, FALSE);
}
}
g_list_free (columns);

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages