Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
G
geany
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
geany
Commits
38147b25
Kaydet (Commit)
38147b25
authored
Mar 31, 2017
tarafından
delt
Kaydeden (comit)
Matthew Brush
Agu 04, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added an option to save/reload either window position or
size, but optionally not both.
üst
745f424b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
23 deletions
+56
-23
geany.glade
data/geany.glade
+20
-4
keyfile.c
src/keyfile.c
+5
-3
libmain.c
src/libmain.c
+20
-12
prefs.c
src/prefs.c
+10
-4
prefs.h
src/prefs.h
+1
-0
No files found.
data/geany.glade
Dosyayı görüntüle @
38147b25
...
...
@@ -941,12 +941,12 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<child>
<object
class=
"GtkCheckButton"
id=
"check_save_win_
pos
"
>
<property
name=
"label"
translatable=
"yes"
>
Save window
position and geometry
</property>
<object
class=
"GtkCheckButton"
id=
"check_save_win_
geom
"
>
<property
name=
"label"
translatable=
"yes"
>
Save window
size
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Saves the window
position and geometry
and restores it at the start
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Saves the window
size
and restores it at the start
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
...
...
@@ -956,6 +956,22 @@
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"check_save_win_pos"
>
<property
name=
"label"
translatable=
"yes"
>
Save window position
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Saves the window position and restores it at the start
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"check_ask_for_quit"
>
<property
name=
"label"
translatable=
"yes"
>
Confirm exit
</property>
...
...
@@ -969,7 +985,7 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
1
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
...
...
src/keyfile.c
Dosyayı görüntüle @
38147b25
...
...
@@ -422,7 +422,8 @@ static void save_dialog_prefs(GKeyFile *config)
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_load_session"
,
prefs
.
load_session
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_project_session"
,
project_prefs
.
project_session
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_project_file_in_basedir"
,
project_prefs
.
project_file_in_basedir
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_save_winpos"
,
prefs
.
save_winpos
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_save_winpos"
,
prefs
.
save_winpos
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_save_wingeom"
,
prefs
.
save_wingeom
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_confirm_exit"
,
prefs
.
confirm_exit
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"pref_main_suppress_status_messages"
,
prefs
.
suppress_status_messages
);
g_key_file_set_boolean
(
config
,
PACKAGE
,
"switch_msgwin_pages"
,
prefs
.
switch_to_status
);
...
...
@@ -576,7 +577,7 @@ static void save_ui_prefs(GKeyFile *config)
g_key_file_set_integer
(
config
,
PACKAGE
,
"scribble_pos"
,
scribble_pos
);
}
if
(
prefs
.
save_winpos
)
if
(
prefs
.
save_winpos
||
prefs
.
save_wingeom
)
{
GdkWindowState
wstate
;
...
...
@@ -758,7 +759,8 @@ static void load_dialog_prefs(GKeyFile *config)
prefs
.
load_session
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_load_session"
,
TRUE
);
project_prefs
.
project_session
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_project_session"
,
TRUE
);
project_prefs
.
project_file_in_basedir
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_project_file_in_basedir"
,
FALSE
);
prefs
.
save_winpos
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_save_winpos"
,
TRUE
);
prefs
.
save_winpos
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_save_winpos"
,
TRUE
);
prefs
.
save_wingeom
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"pref_main_save_wingeom"
,
TRUE
);
prefs
.
beep_on_errors
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"beep_on_errors"
,
TRUE
);
prefs
.
switch_to_status
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"switch_msgwin_pages"
,
FALSE
);
prefs
.
auto_focus
=
utils_get_setting_boolean
(
config
,
PACKAGE
,
"auto_focus"
,
FALSE
);
...
...
src/libmain.c
Dosyayı görüntüle @
38147b25
...
...
@@ -148,19 +148,27 @@ static GOptionEntry entries[] =
static
void
setup_window_position
(
void
)
{
/* interprets the saved window geometry */
if
(
!
prefs
.
save_winpos
)
return
;
if
(
ui_prefs
.
geometry
[
0
]
!=
-
1
&&
ui_prefs
.
geometry
[
1
]
!=
-
1
)
gtk_window_move
(
GTK_WINDOW
(
main_widgets
.
window
),
ui_prefs
.
geometry
[
0
],
ui_prefs
.
geometry
[
1
]);
if
(
ui_prefs
.
geometry
[
2
]
!=
-
1
&&
ui_prefs
.
geometry
[
3
]
!=
-
1
)
gtk_window_set_default_size
(
GTK_WINDOW
(
main_widgets
.
window
),
ui_prefs
.
geometry
[
2
],
ui_prefs
.
geometry
[
3
]);
if
(
prefs
.
save_wingeom
)
{
if
(
ui_prefs
.
geometry
[
2
]
!=
-
1
&&
ui_prefs
.
geometry
[
3
]
!=
-
1
)
{
gtk_window_set_default_size
(
GTK_WINDOW
(
main_widgets
.
window
),
ui_prefs
.
geometry
[
2
],
ui_prefs
.
geometry
[
3
]);
}
}
if
(
ui_prefs
.
geometry
[
4
]
==
1
)
gtk_window_maximize
(
GTK_WINDOW
(
main_widgets
.
window
));
if
(
prefs
.
save_winpos
)
{
if
(
ui_prefs
.
geometry
[
0
]
!=
-
1
&&
ui_prefs
.
geometry
[
1
]
!=
-
1
)
{
gtk_window_move
(
GTK_WINDOW
(
main_widgets
.
window
),
ui_prefs
.
geometry
[
0
],
ui_prefs
.
geometry
[
1
]);
}
if
(
ui_prefs
.
geometry
[
4
]
==
1
)
{
gtk_window_maximize
(
GTK_WINDOW
(
main_widgets
.
window
));
}
}
}
...
...
src/prefs.c
Dosyayı görüntüle @
38147b25
...
...
@@ -417,8 +417,11 @@ static void prefs_init_dialog(void)
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_project_file_in_basedir"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
project_prefs
.
project_file_in_basedir
);
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_pos"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
prefs
.
save_winpos
);
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_pos"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
prefs
.
save_winpos
);
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_geom"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
prefs
.
save_wingeom
);
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_ask_for_quit"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
prefs
.
confirm_exit
);
...
...
@@ -897,8 +900,11 @@ on_prefs_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_project_file_in_basedir"
);
project_prefs
.
project_file_in_basedir
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_pos"
);
prefs
.
save_winpos
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_pos"
);
prefs
.
save_winpos
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_save_win_geom"
);
prefs
.
save_wingeom
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
widget
=
ui_lookup_widget
(
ui_widgets
.
prefs_dialog
,
"check_ask_for_quit"
);
prefs
.
confirm_exit
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
...
...
src/prefs.h
Dosyayı görüntüle @
38147b25
...
...
@@ -39,6 +39,7 @@ typedef struct GeanyPrefs
gboolean
auto_focus
;
gchar
*
default_open_path
;
/**< Default path to look for files when no other path is appropriate. */
gchar
*
custom_plugin_path
;
gboolean
save_wingeom
;
}
GeanyPrefs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment