gnome-commander r1983 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1983 - in branches/gcmd-1-3: . src
- Date: Thu, 14 Aug 2008 22:25:52 +0000 (UTC)
Author: epiotr
Date: Thu Aug 14 22:25:52 2008
New Revision: 1983
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1983&view=rev
Log:
GnomeCmdFileSelector: added operators for conversion to GtkWidget * and GtkBox *
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/src/gnome-cmd-file-selector.cc
branches/gcmd-1-3/src/gnome-cmd-file-selector.h
Modified: branches/gcmd-1-3/src/gnome-cmd-file-selector.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-selector.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-selector.cc Thu Aug 14 22:25:52 2008
@@ -1076,8 +1076,8 @@
if (fs->priv->realized)
{
- gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
- set_cursor_default_for_widget (GTK_WIDGET (fs));
+ gtk_widget_set_sensitive (*fs, TRUE);
+ set_cursor_default_for_widget (*fs);
gtk_widget_grab_focus (GTK_WIDGET (fs->file_list()));
}
@@ -1164,7 +1164,7 @@
fs->priv->connected_dir = NULL;
gnome_cmd_dir_unref (fs->priv->cwd);
set_cursor_default_for_widget (GTK_WIDGET (fs));
- gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
+ gtk_widget_set_sensitive (*fs, TRUE);
if (fs->priv->lwd && fs->priv->con == gnome_cmd_dir_get_connection (fs->priv->lwd))
{
@@ -1292,7 +1292,7 @@
gnome_cmd_file_selector_update_conbuttons_visibility (fs);
// create the box used for packing the con_combo and information
- fs->con_hbox = create_hbox (GTK_WIDGET (fs), FALSE, 2);
+ fs->con_hbox = create_hbox (*fs, FALSE, 2);
// create the list
fs->list_widget = gnome_cmd_file_list_new ();
@@ -1357,7 +1357,7 @@
gtk_box_pack_start (GTK_BOX (vbox), fs->dir_indicator, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (fs->scrolledwindow), fs->list_widget);
gtk_box_pack_start (GTK_BOX (vbox), fs->scrolledwindow, TRUE, TRUE, 0);
- padding = create_hbox (GTK_WIDGET (fs), FALSE, 6);
+ padding = create_hbox (*fs, FALSE, 6);
gtk_box_pack_start (GTK_BOX (vbox), padding, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (padding), fs->info_label, FALSE, TRUE, 6);
gtk_box_pack_start (GTK_BOX (fs->con_hbox), fs->con_combo, FALSE, FALSE, 0);
@@ -1446,7 +1446,7 @@
{
GnomeCmdFileSelector *fs = (GnomeCmdFileSelector *) gtk_type_new (gnome_cmd_file_selector_get_type ());
- return GTK_WIDGET (fs);
+ return *fs;
}
@@ -2162,7 +2162,7 @@
{
if (!fs->con_btns_hbox)
{
- fs->con_btns_hbox = create_hbox (GTK_WIDGET (fs), FALSE, 2);
+ fs->con_btns_hbox = create_hbox (*fs, FALSE, 2);
gtk_box_pack_start (GTK_BOX (fs), fs->con_btns_hbox, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (fs), fs->con_btns_hbox, 0);
gtk_widget_show (fs->con_btns_hbox);
@@ -2198,16 +2198,14 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- GtkWidget *close_btn, *entry, *label, *parent;
-
- parent = GTK_WIDGET (fs);
+ GtkWidget *parent = *fs;
if (fs->priv->filter_box) return;
fs->priv->filter_box = create_hbox (parent, FALSE, 0);
- label = create_label (parent, _("Filter:"));
- entry = create_entry (parent, "entry", "");
- close_btn = create_button_with_data (GTK_WIDGET (main_win), "x", GTK_SIGNAL_FUNC (on_filter_box_close), fs);
+ GtkWidget *label = create_label (parent, _("Filter:"));
+ GtkWidget *entry = create_entry (parent, "entry", "");
+ GtkWidget *close_btn = create_button_with_data (GTK_WIDGET (main_win), "x", GTK_SIGNAL_FUNC (on_filter_box_close), fs);
gtk_signal_connect (GTK_OBJECT (entry), "key-press-event", GTK_SIGNAL_FUNC (on_filter_box_keypressed), fs);
gtk_box_pack_start (GTK_BOX (fs->priv->filter_box), label, FALSE, TRUE, 0);
Modified: branches/gcmd-1-3/src/gnome-cmd-file-selector.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-selector.h (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-selector.h Thu Aug 14 22:25:52 2008
@@ -65,7 +65,10 @@
Private *priv;
- GnomeCmdFileList *&file_list() { return list; }
+ operator GtkWidget * () { return GTK_WIDGET (this); }
+ operator GtkBox * () { return GTK_BOX (this); }
+
+ GnomeCmdFileList *&file_list() { return list; }
GnomeCmdDir *get_directory();
void set_directory(GnomeCmdDir *dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]