[maemo-commits] [maemo-commits] r16092 - projects/haf/branches/hildon-fm/fremantle/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Sep 11 10:45:08 EEST 2008
- Previous message: [maemo-commits] r16091 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16093 - projects/haf/branches/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: yangli Date: 2008-09-11 10:45:07 +0300 (Thu, 11 Sep 2008) New Revision: 16092 Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-chooser-dialog.c Log: proper size of the buttons, cancel button is shorten for adjusting layout purpose Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-chooser-dialog.c =================================================================== --- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-chooser-dialog.c 2008-09-10 16:05:42 UTC (rev 16091) +++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-chooser-dialog.c 2008-09-11 07:45:07 UTC (rev 16092) @@ -691,8 +691,8 @@ gtk_label_set_text(GTK_LABEL(priv->title_location), title); hildon_button_set_text(HILDON_BUTTON(priv->location_button), - title, NULL); - + title, NULL); + gtk_button_set_alignment(GTK_BUTTON(priv->location_button), 0.0, 0.5); if (icon) /* It's possible that we don't get an icon */ { gtk_image_set_from_pixbuf(GTK_IMAGE(priv->image_location), icon); @@ -1128,8 +1128,6 @@ static void build_ui(HildonFileChooserDialog * self) { HildonFileChooserDialogPrivate *priv = self->priv; - gint width; - gint height; switch (priv->action) { case GTK_FILE_CHOOSER_ACTION_OPEN: @@ -1151,7 +1149,7 @@ gtk_button_set_label(GTK_BUTTON(priv->action_button), _("ckdg_bd_select_object_ok_open")); gtk_button_set_label(GTK_BUTTON(priv->cancel_button), - _("ckdg_bd_select_object_cancel")); + "C"); hildon_helper_set_insensitive_message (priv->action_button, _("sfil_ib_select_file")); break; @@ -1189,7 +1187,7 @@ gtk_button_set_label(GTK_BUTTON(priv->folder_button), _("sfil_bd_save_object_dialog_change_folder")); gtk_button_set_label(GTK_BUTTON(priv->cancel_button), - _("ckdg_bd_save_object_dialog_cancel")); + /* _("ckdg_bd_save_object_dialog_cancel")*/"C"); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(self), _("ckdg_va_save_object_name_stub_default")); hildon_helper_set_insensitive_message (priv->action_button, @@ -1200,22 +1198,13 @@ gtk_widget_hide(priv->hbox_items); gtk_widget_set_size_request(GTK_WIDGET(priv->filetree), - FILE_SELECTION_WIDTH_LIST, + FILE_SELECTION_WIDTH_TOTAL, FILE_SELECTION_HEIGHT); gtk_widget_show(GTK_WIDGET(priv->filetree)); - gtk_widget_get_size_request(GTK_WIDGET(priv->filetree), - &width, &height); - gtk_widget_set_size_request(GTK_WIDGET(priv->hbox_address), - width, - FILE_SELECTION_ADDRESS_HEIGHT); gtk_widget_set_size_request(GTK_WIDGET(priv->up_button), FILE_SELECTION_UPBUTTON_WIDTH, - FILE_SELECTION_ADDRESS_HEIGHT); - /*gtk_widget_set_size_request(GTK_WIDGET(priv->path_button), - width - FILE_SELECTION_UPBUTTON_WIDTH, - FILE_SELECTION_ADDRESS_HEIGHT);*/ - + FILE_SELECTION_ADDRESS_HEIGHT); gtk_widget_show_all(priv->hbox_address); gtk_widget_hide(priv->path_label); hildon_file_chooser_dialog_reset_files_visibility(priv, @@ -1230,7 +1219,7 @@ gtk_button_set_label(GTK_BUTTON(priv->folder_button), _("ckdg_bd_change_folder_new_folder")); gtk_button_set_label(GTK_BUTTON(priv->cancel_button), - _("ckdg_bd_change_folder_cancel")); + /*_("ckdg_bd_change_folder_cancel")*/"C"); hildon_helper_set_insensitive_message (priv->action_button, _("sfil_ib_select_file")); break; @@ -1250,7 +1239,7 @@ gtk_button_set_label(GTK_BUTTON(priv->action_button), _("ckdg_bd_new_folder_dialog_ok")); gtk_button_set_label(GTK_BUTTON(priv->cancel_button), - _("ckdg_bd_new_folder_dialog_cancel")); + /* _("ckdg_bd_new_folder_dialog_cancel")*/"C"); hildon_helper_set_insensitive_message (priv->action_button, HCS("ckdg_ib_enter_name")); break; @@ -2166,8 +2155,10 @@ } strcat(path_string, "/"); } - if(priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + if(priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER){ hildon_button_set_text(HILDON_BUTTON(priv->path_button), path_string, NULL); + gtk_button_set_alignment(GTK_BUTTON(priv->path_button), 0.0, 0.5); + } else if(priv->action == GTK_FILE_CHOOSER_ACTION_OPEN) { gtk_label_set_text(GTK_LABEL(priv->path_label), path_string); } @@ -2255,10 +2246,9 @@ G_CALLBACK (hildon_response_up_button_clicked), self); gtk_widget_show(priv->up_button); - priv->path_button = hildon_button_new_with_text(HILDON_SIZE_FINGER_HEIGHT | - HILDON_SIZE_AUTO_WIDTH, - HILDON_BUTTON_ARRANGEMENT_HORIZONTAL, - "Nokia", NULL); + priv->path_button = hildon_button_new(HILDON_SIZE_FINGER_HEIGHT | + HILDON_SIZE_AUTO_WIDTH, + HILDON_BUTTON_ARRANGEMENT_HORIZONTAL); g_signal_connect (G_OBJECT (priv->path_button), "clicked", G_CALLBACK (hildon_response_path_button_clicked), self); gtk_widget_show(priv->path_button); @@ -2277,7 +2267,7 @@ HILDON_RESPONSE_FOLDER_BUTTON); priv->cancel_button = gtk_dialog_add_button(GTK_DIALOG(self), - _("ckdg_bd_select_object_cancel"), + "C", GTK_RESPONSE_CANCEL); priv->entry_name = gtk_entry_new(); @@ -2325,9 +2315,9 @@ gtk_box_pack_start(GTK_BOX(priv->hbox_address), priv->up_button, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(priv->hbox_address), priv->path_button, - FALSE, TRUE, 0); + TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(priv->hbox_address), priv->path_label, - FALSE, TRUE, 0); + TRUE, TRUE, 0); priv->caption_control_location = hildon_caption_new(size_group, _("sfil_fi_save_objects_items"), eventbox, NULL, @@ -2582,6 +2572,7 @@ /* if there is a valid extension selected, just leave it */ if (hildon_touch_selector_get_selected (selector, 0, &iter)) + //if (hildon_touch_selector_get_active_iter (selector, 0, &iter)) { gboolean matches; gchar *ext; @@ -2602,6 +2593,7 @@ if (strcmp (ext, priv->ext_name + 1) == 0) { hildon_touch_selector_select_iter (selector, 0, &iter, TRUE); + //hildon_touch_selector_set_active_iter (selector, 0, &iter, TRUE); hildon_button_set_value(HILDON_BUTTON(priv->extensions_combo), ext); g_free (ext);
- Previous message: [maemo-commits] r16091 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16093 - projects/haf/branches/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]