[anjuta/gnome-3-4] document-manager: bgo#680559 - Find in Files does not scroll to top of results
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-3-4] document-manager: bgo#680559 - Find in Files does not scroll to top of results
- Date: Sat, 28 Jul 2012 09:51:32 +0000 (UTC)
commit cc011ecc43c63adb1a285426d5cb4f0015c81269
Author: Johannes Schmid <jhs gnome org>
Date: Thu Jul 26 11:46:07 2012 +0200
document-manager: bgo#680559 - Find in Files does not scroll to top of results
.../document-manager/anjuta-document-manager.ui | 23 +++++--------------
plugins/document-manager/search-files.c | 15 +++++++++++++
2 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/plugins/document-manager/anjuta-document-manager.ui b/plugins/document-manager/anjuta-document-manager.ui
index cdcfa9b..0fe6092 100644
--- a/plugins/document-manager/anjuta-document-manager.ui
+++ b/plugins/document-manager/anjuta-document-manager.ui
@@ -73,8 +73,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -212,8 +212,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -229,8 +229,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton9</property>
</object>
@@ -246,8 +246,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton9</property>
</object>
@@ -263,8 +263,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton9</property>
</object>
@@ -361,8 +361,6 @@
<property name="vexpand">True</property>
<property name="row_spacing">5</property>
<property name="column_spacing">5</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
<child>
<object class="GtkEntry" id="search_entry">
<property name="visible">True</property>
@@ -407,8 +405,6 @@
<property name="hexpand">True</property>
<property name="row_spacing">5</property>
<property name="column_spacing">5</property>
- <property name="n_rows">1</property>
- <property name="n_columns">5</property>
<child>
<object class="GtkComboBox" id="file_type_combo">
<property name="visible">True</property>
@@ -429,7 +425,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">start</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -444,7 +439,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -462,7 +456,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -494,7 +487,7 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
@@ -526,15 +519,12 @@
<property name="valign">start</property>
<property name="row_spacing">5</property>
<property name="column_spacing">5</property>
- <property name="n_rows">2</property>
- <property name="n_columns">1</property>
<child>
<object class="GtkButton" id="search_button">
<property name="label">gtk-find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="search_files_search_clicked" swapped="yes"/>
</object>
@@ -551,7 +541,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<signal name="clicked" handler="search_files_replace_clicked" swapped="yes"/>
</object>
<packing>
diff --git a/plugins/document-manager/search-files.c b/plugins/document-manager/search-files.c
index 73a311c..348d9db 100644
--- a/plugins/document-manager/search-files.c
+++ b/plugins/document-manager/search-files.c
@@ -52,6 +52,7 @@ struct _SearchFilesPrivate
GtkWidget* files_tree;
GtkTreeModel* files_model;
+ GtkWidget* scrolled_window;
GtkWidget* files_tree_check;
@@ -168,8 +169,20 @@ search_files_check_column_toggled (GtkCellRendererToggle* renderer,
static void
search_files_finished (SearchFiles* sf, AnjutaCommandQueue* queue)
{
+ GtkAdjustment* h_adj;
+ GtkAdjustment* v_adj;
+
g_object_unref (queue);
sf->priv->busy = FALSE;
+
+ /* Scroll to first item */
+ h_adj =
+ gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (sf->priv->scrolled_window));
+ v_adj =
+ gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sf->priv->scrolled_window));
+ gtk_adjustment_set_value (h_adj, 0.0);
+ gtk_adjustment_set_value (v_adj, 0.0);
+
search_files_update_ui(sf);
}
@@ -795,6 +808,8 @@ search_files_init (SearchFiles* sf)
sf->priv->files_tree = GTK_WIDGET (gtk_builder_get_object(sf->priv->builder,
"files_tree"));
+ sf->priv->scrolled_window = GTK_WIDGET (gtk_builder_get_object (sf->priv->builder,
+ "scrolled_window"));
search_files_init_tree(sf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]